Fix ItemListController crash?

This commit is contained in:
Peter
2019-10-06 04:25:10 +04:00
parent 3ddbeea591
commit 36c82642d6
77 changed files with 615 additions and 244 deletions

View File

@@ -70,7 +70,8 @@ private enum LogoutOptionsEntry: ItemListNodeEntry, Equatable {
return lhs.stableId < rhs.stableId
}
func item(_ arguments: LogoutOptionsItemArguments) -> ListViewItem {
func item(_ arguments: Any) -> ListViewItem {
let arguments = arguments as! LogoutOptionsItemArguments
switch self {
case let .alternativeHeader(theme, title):
return ItemListSectionHeaderItem(theme: theme, text: title, sectionId: self.section)
@@ -225,7 +226,7 @@ func logoutOptionsController(context: AccountContext, navigationController: Navi
context.sharedContext.accountManager.accessChallengeData(),
hasWallets
)
|> map { presentationData, accessChallengeData, hasWallets -> (ItemListControllerState, (ItemListNodeState<LogoutOptionsEntry>, LogoutOptionsEntry.ItemGenerationArguments)) in
|> map { presentationData, accessChallengeData, hasWallets -> (ItemListControllerState, (ItemListNodeState, Any)) in
let leftNavigationButton = ItemListNavigationButton(content: .text(presentationData.strings.Common_Cancel), style: .regular, enabled: true, action: {
dismissImpl?()
})