mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
FIx bot app titles in settings
This commit is contained in:
parent
6b359244b4
commit
551bc89e1c
@ -723,8 +723,10 @@ final class LocalizationListControllerNode: ViewControllerTracingNode {
|
||||
}
|
||||
strongSelf.applyingCode.set(.single(info.languageCode))
|
||||
strongSelf.applyDisposable.set((strongSelf.context.engine.localization.downloadAndApplyLocalization(accountManager: strongSelf.context.sharedContext.accountManager, languageCode: info.languageCode)
|
||||
|> deliverOnMainQueue).start(completed: {
|
||||
|> deliverOnMainQueue).start(completed: { [weak self] in
|
||||
self?.applyingCode.set(.single(nil))
|
||||
|
||||
self?.context.engine.messages.refreshAttachMenuBots()
|
||||
}))
|
||||
}
|
||||
if info.isOfficial {
|
||||
|
@ -522,6 +522,10 @@ public extension TelegramEngine {
|
||||
public func invokeBotCustomMethod(botId: PeerId, method: String, params: String) -> Signal<String, InvokeBotCustomMethodError> {
|
||||
return _internal_invokeBotCustomMethod(postbox: self.account.postbox, network: self.account.network, botId: botId, method: method, params: params)
|
||||
}
|
||||
|
||||
public func refreshAttachMenuBots() {
|
||||
let _ = managedSynchronizeAttachMenuBots(accountPeerId: self.account.peerId, postbox: self.account.postbox, network: self.account.network, force: true).startStandalone()
|
||||
}
|
||||
|
||||
public func addBotToAttachMenu(botId: PeerId, allowWrite: Bool) -> Signal<Bool, AddBotToAttachMenuError> {
|
||||
return _internal_addBotToAttachMenu(accountPeerId: self.account.peerId, postbox: self.account.postbox, network: self.account.network, botId: botId, allowWrite: allowWrite)
|
||||
|
@ -60,7 +60,7 @@ private final class PeerInfoScreenDisclosureItemNode: PeerInfoScreenItemNode {
|
||||
private let bottomSeparatorNode: ASDisplayNode
|
||||
private let activateArea: AccessibilityAreaNode
|
||||
|
||||
private var iconDisposable: Disposable?
|
||||
private var iconDisposable = MetaDisposable()
|
||||
|
||||
private var item: PeerInfoScreenDisclosureItem?
|
||||
|
||||
@ -115,7 +115,7 @@ private final class PeerInfoScreenDisclosureItemNode: PeerInfoScreenItemNode {
|
||||
}
|
||||
|
||||
deinit {
|
||||
self.iconDisposable?.dispose()
|
||||
self.iconDisposable.dispose()
|
||||
}
|
||||
|
||||
override func update(width: CGFloat, safeInsets: UIEdgeInsets, presentationData: PresentationData, item: PeerInfoScreenItem, topItem: PeerInfoScreenItem?, bottomItem: PeerInfoScreenItem?, hasCorners: Bool, transition: ContainedViewLayoutTransition) -> CGFloat {
|
||||
@ -169,12 +169,12 @@ private final class PeerInfoScreenDisclosureItemNode: PeerInfoScreenItemNode {
|
||||
} else if let iconSignal = item.iconSignal {
|
||||
if previousItem?.text != item.text {
|
||||
self.iconNode.image = nil
|
||||
self.iconDisposable = (iconSignal
|
||||
self.iconDisposable.set((iconSignal
|
||||
|> deliverOnMainQueue).startStrict(next: { [weak self] icon in
|
||||
if let self {
|
||||
self.iconNode.image = icon
|
||||
}
|
||||
})
|
||||
}))
|
||||
}
|
||||
iconSize = CGSize(width: 29.0, height: 29.0)
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user