mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Fix set default icon
This commit is contained in:
parent
c49713e4d1
commit
75722ecbde
2 changed files with 7 additions and 11 deletions
|
|
@ -575,7 +575,7 @@ public func themeSettingsController(context: AccountContext, focusOnItemTag: The
|
|||
pushControllerImpl?(controller)
|
||||
} else {
|
||||
currentAppIconName.set(icon.name)
|
||||
context.sharedContext.applicationBindings.requestSetAlternateIconName(icon.name, { _ in
|
||||
context.sharedContext.applicationBindings.requestSetAlternateIconName(icon.isDefault ? nil : icon.name, { _ in
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -888,16 +888,12 @@ private func extractAccountManagerState(records: AccountRecordsView<TelegramAcco
|
|||
return nil
|
||||
}
|
||||
}, requestSetAlternateIconName: { name, completion in
|
||||
if #available(iOS 10.3, *) {
|
||||
application.setAlternateIconName(name, completionHandler: { error in
|
||||
if let error = error {
|
||||
Logger.shared.log("App \(self.episodeId)", "failed to set alternate icon with error \(error.localizedDescription)")
|
||||
}
|
||||
completion(error == nil)
|
||||
})
|
||||
} else {
|
||||
completion(false)
|
||||
}
|
||||
application.setAlternateIconName(name, completionHandler: { error in
|
||||
if let error = error {
|
||||
Logger.shared.log("App \(self.episodeId)", "failed to set alternate icon with error \(error.localizedDescription)")
|
||||
}
|
||||
completion(error == nil)
|
||||
})
|
||||
}, forceOrientation: { orientation in
|
||||
let value = orientation.rawValue
|
||||
if #available(iOSApplicationExtension 16.0, iOS 16.0, *) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue