Settings: Always show autoarchive option for premium users (#6199)
This commit is contained in:
parent
b2d58b6cfd
commit
961736cfb4
@ -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;
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
@ -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',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user