mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Fix ItemListController crash?
This commit is contained in:
@@ -116,7 +116,8 @@ private enum ProxySettingsEntry: ItemListNodeEntry {
|
||||
return lhs.stableId < rhs.stableId
|
||||
}
|
||||
|
||||
func item(_ arguments: proxyServerSettingsControllerArguments) -> ListViewItem {
|
||||
func item(_ arguments: Any) -> ListViewItem {
|
||||
let arguments = arguments as! proxyServerSettingsControllerArguments
|
||||
switch self {
|
||||
case let .usePasteboardSettings(theme, title):
|
||||
return ItemListActionItem(theme: theme, title: title, kind: .generic, alignment: .natural, sectionId: self.section, style: .blocks, action: {
|
||||
@@ -335,7 +336,7 @@ func proxyServerSettingsController(context: AccountContext? = nil, theme: Presen
|
||||
|
||||
let signal = combineLatest(updatedPresentationData, statePromise.get())
|
||||
|> deliverOnMainQueue
|
||||
|> map { presentationData, state -> (ItemListControllerState, (ItemListNodeState<ProxySettingsEntry>, ProxySettingsEntry.ItemGenerationArguments)) in
|
||||
|> map { presentationData, state -> (ItemListControllerState, (ItemListNodeState, Any)) in
|
||||
let leftNavigationButton = ItemListNavigationButton(content: .text(presentationData.strings.Common_Cancel), style: .regular, enabled: true, action: {
|
||||
dismissImpl?()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user