@@ -47,7 +47,7 @@ private enum IntentsSettingsSection: Int32 {
4747
4848private enum IntentsSettingsControllerEntry : ItemListNodeEntry {
4949 case accountHeader( PresentationTheme , String )
50- case account( PresentationTheme , EnginePeer , Bool , Int32 )
50+ case account( PresentationTheme , Account , EnginePeer , Bool , Int32 )
5151 case accountInfo( PresentationTheme , String )
5252
5353 case chatsHeader( PresentationTheme , String )
@@ -80,7 +80,7 @@ private enum IntentsSettingsControllerEntry: ItemListNodeEntry {
8080 switch self {
8181 case . accountHeader:
8282 return 0
83- case let . account( _, _, _, index) :
83+ case let . account( _, _, _, _ , index) :
8484 return 1 + index
8585 case . accountInfo:
8686 return 1000
@@ -115,8 +115,8 @@ private enum IntentsSettingsControllerEntry: ItemListNodeEntry {
115115 } else {
116116 return false
117117 }
118- case let . account( lhsTheme, lhsPeer, lhsSelected, lhsIndex) :
119- if case let . account( rhsTheme, rhsPeer, rhsSelected, rhsIndex) = rhs, lhsTheme === rhsTheme, lhsPeer == rhsPeer, lhsSelected == rhsSelected, lhsIndex == rhsIndex {
118+ case let . account( lhsTheme, lhsAccount , lhsPeer, lhsSelected, lhsIndex) :
119+ if case let . account( rhsTheme, rhsAccount , rhsPeer, rhsSelected, rhsIndex) = rhs, lhsTheme === rhsTheme, lhsAccount === rhsAccount , lhsPeer == rhsPeer, lhsSelected == rhsSelected, lhsIndex == rhsIndex {
120120 return true
121121 } else {
122122 return false
@@ -200,8 +200,8 @@ private enum IntentsSettingsControllerEntry: ItemListNodeEntry {
200200 switch self {
201201 case let . accountHeader( _, text) :
202202 return ItemListSectionHeaderItem ( presentationData: presentationData, text: text, sectionId: self . section)
203- case let . account( _, peer, selected, _) :
204- return ItemListPeerItem ( presentationData: presentationData, systemStyle: . glass, dateTimeFormat: PresentationDateTimeFormat ( ) , nameDisplayOrder: . firstLast, context: arguments. context. sharedContext. makeTempAccountContext ( account: arguments . context . account) , peer: peer, height: . generic, aliasHandling: . standard, nameStyle: . plain, presence: nil , text: . none, label: . none, editing: ItemListPeerItemEditing ( editable: true , editing: false , revealed: false ) , revealOptions: nil , switchValue: ItemListPeerItemSwitch ( value: selected, style: . check) , enabled: true , selectable: true , sectionId: self . section, action: {
203+ case let . account( _, account , peer, selected, _) :
204+ return ItemListPeerItem ( presentationData: presentationData, systemStyle: . glass, dateTimeFormat: PresentationDateTimeFormat ( ) , nameDisplayOrder: . firstLast, context: arguments. context. sharedContext. makeTempAccountContext ( account: account) , peer: peer, height: . generic, aliasHandling: . standard, nameStyle: . plain, presence: nil , text: . none, label: . none, editing: ItemListPeerItemEditing ( editable: true , editing: false , revealed: false ) , revealOptions: nil , switchValue: ItemListPeerItemSwitch ( value: selected, style: . check) , enabled: true , selectable: true , sectionId: self . section, action: {
205205 arguments. updateSettings { $0. withUpdatedAccount ( peer. id) }
206206 } , setPeerIdWithRevealedOptions: { _, _ in } , removePeer: { _ in } )
207207 case let . accountInfo( _, text) :
@@ -251,8 +251,8 @@ private func intentsSettingsControllerEntries(context: AccountContext, presentat
251251 if accounts. count > 1 {
252252 entries. append ( . accountHeader( presentationData. theme, presentationData. strings. IntentsSettings_MainAccount. uppercased ( ) ) )
253253 var index : Int32 = 0
254- for (_ , peer) in accounts {
255- entries. append ( . account( presentationData. theme, peer, peer. id == settings. account, index) )
254+ for (account , peer) in accounts {
255+ entries. append ( . account( presentationData. theme, account , peer, peer. id == settings. account, index) )
256256 index += 1
257257 }
258258 entries. append ( . accountInfo( presentationData. theme, presentationData. strings. IntentsSettings_MainAccountInfo) )
0 commit comments