mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-03 21:16:35 +00:00
Autoscroll to auto-archive
This commit is contained in:
parent
e055c689b8
commit
a543f7003f
@ -60,6 +60,7 @@ private enum PrivacyAndSecuritySection: Int32 {
|
|||||||
|
|
||||||
public enum PrivacyAndSecurityEntryTag: ItemListItemTag {
|
public enum PrivacyAndSecurityEntryTag: ItemListItemTag {
|
||||||
case accountTimeout
|
case accountTimeout
|
||||||
|
case autoArchive
|
||||||
|
|
||||||
public func isEqual(to other: ItemListItemTag) -> Bool {
|
public func isEqual(to other: ItemListItemTag) -> Bool {
|
||||||
if let other = other as? PrivacyAndSecurityEntryTag, self == other {
|
if let other = other as? PrivacyAndSecurityEntryTag, self == other {
|
||||||
@ -333,7 +334,7 @@ private enum PrivacyAndSecurityEntry: ItemListNodeEntry {
|
|||||||
case let .autoArchive(text, value):
|
case let .autoArchive(text, value):
|
||||||
return ItemListSwitchItem(presentationData: presentationData, title: text, value: value, sectionId: self.section, style: .blocks, updated: { value in
|
return ItemListSwitchItem(presentationData: presentationData, title: text, value: value, sectionId: self.section, style: .blocks, updated: { value in
|
||||||
arguments.toggleArchiveAndMuteNonContacts(value)
|
arguments.toggleArchiveAndMuteNonContacts(value)
|
||||||
})
|
}, tag: PrivacyAndSecurityEntryTag.autoArchive)
|
||||||
case let .autoArchiveInfo(text):
|
case let .autoArchiveInfo(text):
|
||||||
return ItemListTextItem(presentationData: presentationData, text: .plain(text), sectionId: self.section)
|
return ItemListTextItem(presentationData: presentationData, text: .plain(text), sectionId: self.section)
|
||||||
case let .accountHeader(theme, text):
|
case let .accountHeader(theme, text):
|
||||||
|
|||||||
@ -1061,7 +1061,7 @@ public func settingsController(context: AccountContext, accountManager: AccountM
|
|||||||
blockedPeers.set(.single(blockedPeersContext))
|
blockedPeers.set(.single(blockedPeersContext))
|
||||||
}, updatedHasTwoStepAuth: { hasTwoStepAuthValue in
|
}, updatedHasTwoStepAuth: { hasTwoStepAuthValue in
|
||||||
hasTwoStepAuthPromise.set(.single(hasTwoStepAuthValue))
|
hasTwoStepAuthPromise.set(.single(hasTwoStepAuthValue))
|
||||||
}, activeSessionsContext: activeSessionsContext, webSessionsContext: webSessionsContext, blockedPeersContext: blockedPeersContext, hasTwoStepAuth: hasTwoStepAuth))
|
}, focusOnItemTag: nil, activeSessionsContext: activeSessionsContext, webSessionsContext: webSessionsContext, blockedPeersContext: blockedPeersContext, hasTwoStepAuth: hasTwoStepAuth))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}, openDataAndStorage: {
|
}, openDataAndStorage: {
|
||||||
@ -2041,5 +2041,5 @@ private func accountContextMenuItems(context: AccountContext, logout: @escaping
|
|||||||
}
|
}
|
||||||
|
|
||||||
public func makePrivacyAndSecurityController(context: AccountContext) -> ViewController {
|
public func makePrivacyAndSecurityController(context: AccountContext) -> ViewController {
|
||||||
return privacyAndSecurityController(context: context)
|
return privacyAndSecurityController(context: context, focusOnItemTag: PrivacyAndSecurityEntryTag.autoArchive)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user