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;
hiddenMembersMinCount: number;
limits: Record<ApiLimitType, readonly [number, number]>;
canDisplayAutoarchiveSetting: boolean;
canDisplayAutoarchiveSetting?: boolean;
storyViewersExpirePeriod: number;
storyChangelogUserId: string;
maxPinnedStoriesCount: number;

View File

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

View File

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