mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Bot start button improvements
This commit is contained in:
@@ -233,7 +233,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
||||
private let context: AccountContext
|
||||
public let chatLocation: ChatLocation
|
||||
public let subject: ChatControllerSubject?
|
||||
private let botStart: ChatControllerInitialBotStart?
|
||||
private var botStart: ChatControllerInitialBotStart?
|
||||
private var attachBotStart: ChatControllerInitialAttachBotStart?
|
||||
private var botAppStart: ChatControllerInitialBotAppStart?
|
||||
|
||||
@@ -7183,6 +7183,13 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
||||
strongSelf.updateChatPresentationInterfaceState(animated: true, interactive: strongSelf.isViewLoaded && strongSelf.view.window != nil, {
|
||||
$0.updatedChatHistoryState(state)
|
||||
})
|
||||
|
||||
if let botStart = strongSelf.botStart, case let .loaded(isEmpty) = state {
|
||||
strongSelf.botStart = nil
|
||||
if !isEmpty {
|
||||
strongSelf.startBot(botStart.payload)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -9596,6 +9603,8 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
||||
}
|
||||
}, presentController: { [weak self] controller, arguments in
|
||||
self?.present(controller, in: .window(.root), with: arguments)
|
||||
}, presentControllerInCurrent: { [weak self] controller, arguments in
|
||||
self?.present(controller, in: .current, with: arguments)
|
||||
}, getNavigationController: { [weak self] in
|
||||
return self?.navigationController as? NavigationController
|
||||
}, presentGlobalOverlayController: { [weak self] controller, arguments in
|
||||
@@ -17670,7 +17679,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
||||
if let controller = controller as? UndoOverlayController {
|
||||
controller.dismissWithCommitAction()
|
||||
}
|
||||
if let controller = controller as? TooltipScreen {
|
||||
if let controller = controller as? TooltipScreen, !controller.alwaysVisible {
|
||||
controller.dismiss()
|
||||
}
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user