Settings: Always show autoarchive option for premium users (#6199)

This commit is contained in:
zubiden 2025-09-09 20:26:18 +02:00 committed by Alexander Zinchuk
parent b2d58b6cfd
commit 961736cfb4
3 changed files with 4 additions and 4 deletions

View File

@ -220,7 +220,7 @@ export interface ApiAppConfig {
topicsPinnedLimit: number; topicsPinnedLimit: number;
hiddenMembersMinCount: number; hiddenMembersMinCount: number;
limits: Record<ApiLimitType, readonly [number, number]>; limits: Record<ApiLimitType, readonly [number, number]>;
canDisplayAutoarchiveSetting: boolean; canDisplayAutoarchiveSetting?: boolean;
storyViewersExpirePeriod: number; storyViewersExpirePeriod: number;
storyChangelogUserId: string; storyChangelogUserId: string;
maxPinnedStoriesCount: number; maxPinnedStoriesCount: number;

View File

@ -481,15 +481,16 @@ export default memo(withGlobal<OwnProps>(
const { canDisplayChatInTitle } = selectSharedSettings(global); const { canDisplayChatInTitle } = selectSharedSettings(global);
const shouldChargeForMessages = Boolean(nonContactPeersPaidStars); const shouldChargeForMessages = Boolean(nonContactPeersPaidStars);
const isCurrentUserFrozen = selectIsCurrentUserFrozen(global); const isCurrentUserFrozen = selectIsCurrentUserFrozen(global);
const isCurrentUserPremium = selectIsCurrentUserPremium(global);
return { return {
isCurrentUserPremium: selectIsCurrentUserPremium(global), isCurrentUserPremium,
hasPassword, hasPassword,
hasPasscode: Boolean(hasPasscode), hasPasscode: Boolean(hasPasscode),
blockedCount: blocked.totalCount, blockedCount: blocked.totalCount,
webAuthCount: global.activeWebSessions.orderedHashes.length, webAuthCount: global.activeWebSessions.orderedHashes.length,
isSensitiveEnabled, isSensitiveEnabled,
canDisplayAutoarchiveSetting: Boolean(appConfig.canDisplayAutoarchiveSetting), canDisplayAutoarchiveSetting: appConfig.canDisplayAutoarchiveSetting || isCurrentUserPremium,
shouldArchiveAndMuteNewNonContact, shouldArchiveAndMuteNewNonContact,
canChangeSensitive, canChangeSensitive,
shouldNewNonContactPeersRequirePremium, shouldNewNonContactPeersRequirePremium,

View File

@ -58,7 +58,6 @@ export const DEFAULT_APP_CONFIG: ApiAppConfig = {
moreAccounts: DEFAULT_LIMITS.moreAccounts, moreAccounts: DEFAULT_LIMITS.moreAccounts,
maxReactions: DEFAULT_LIMITS.maxReactions, maxReactions: DEFAULT_LIMITS.maxReactions,
}, },
canDisplayAutoarchiveSetting: true,
autologinDomains: [ autologinDomains: [
'instantview.telegram.org', 'instantview.telegram.org',
'translations.telegram.org', 'translations.telegram.org',