mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Fix ItemListController crash?
This commit is contained in:
@@ -66,7 +66,8 @@ private enum UpdateInfoControllerEntry: ItemListNodeEntry {
|
||||
return lhs.stableId < rhs.stableId
|
||||
}
|
||||
|
||||
func item(_ arguments: UpdateInfoControllerArguments) -> ListViewItem {
|
||||
func item(_ arguments: Any) -> ListViewItem {
|
||||
let arguments = arguments as! UpdateInfoControllerArguments
|
||||
switch self {
|
||||
case let .info(theme, icon, title, text, entities):
|
||||
return UpdateInfoItem(theme: theme, appIcon: icon, title: title, text: text, entities: entities, sectionId: self.section, style: .blocks, linkItemAction: { action, itemLink in
|
||||
@@ -106,7 +107,7 @@ public func updateInfoController(context: AccountContext, appUpdateInfo: AppUpda
|
||||
|
||||
let signal = context.sharedContext.presentationData
|
||||
|> deliverOnMainQueue
|
||||
|> map { presentationData -> (ItemListControllerState, (ItemListNodeState<UpdateInfoControllerEntry>, UpdateInfoControllerEntry.ItemGenerationArguments)) in
|
||||
|> map { presentationData -> (ItemListControllerState, (ItemListNodeState, Any)) in
|
||||
let appIcon: PresentationAppIcon?
|
||||
let appIcons = context.sharedContext.applicationBindings.getAvailableAlternateIcons()
|
||||
if let alternateIconName = context.sharedContext.applicationBindings.getAlternateIconName() {
|
||||
|
||||
Reference in New Issue
Block a user