mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix invisible pinned messages button actions
This commit is contained in:
parent
826f87b51e
commit
89abe476d9
@ -1594,13 +1594,22 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
|
|
||||||
return true
|
return true
|
||||||
}, requestMessageActionCallback: { [weak self] messageId, data, isGame, requiresPassword in
|
}, requestMessageActionCallback: { [weak self] messageId, data, isGame, requiresPassword in
|
||||||
if let strongSelf = self {
|
guard let strongSelf = self else {
|
||||||
|
return
|
||||||
|
}
|
||||||
guard strongSelf.presentationInterfaceState.subject != .scheduledMessages else {
|
guard strongSelf.presentationInterfaceState.subject != .scheduledMessages else {
|
||||||
strongSelf.present(textAlertController(context: strongSelf.context, updatedPresentationData: strongSelf.updatedPresentationData, title: nil, text: strongSelf.presentationData.strings.ScheduledMessages_BotActionUnavailable, actions: [TextAlertAction(type: .defaultAction, title: strongSelf.presentationData.strings.Common_OK, action: {})]), in: .window(.root))
|
strongSelf.present(textAlertController(context: strongSelf.context, updatedPresentationData: strongSelf.updatedPresentationData, title: nil, text: strongSelf.presentationData.strings.ScheduledMessages_BotActionUnavailable, actions: [TextAlertAction(type: .defaultAction, title: strongSelf.presentationData.strings.Common_OK, action: {})]), in: .window(.root))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if let message = strongSelf.chatDisplayNode.historyNode.messageInCurrentHistoryView(messageId) {
|
let _ = (strongSelf.context.account.postbox.transaction { transaction -> Message? in
|
||||||
|
return transaction.getMessage(messageId)
|
||||||
|
}
|
||||||
|
|> deliverOnMainQueue).start(next: { message in
|
||||||
|
guard let strongSelf = self, let message = message else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
strongSelf.updateChatPresentationInterfaceState(animated: true, interactive: true, {
|
strongSelf.updateChatPresentationInterfaceState(animated: true, interactive: true, {
|
||||||
return $0.updatedTitlePanelContext {
|
return $0.updatedTitlePanelContext {
|
||||||
if !$0.contains(where: {
|
if !$0.contains(where: {
|
||||||
@ -1738,8 +1747,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
proceedWithResult(result)
|
proceedWithResult(result)
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
}
|
|
||||||
}, requestMessageActionUrlAuth: { [weak self] defaultUrl, subject in
|
}, requestMessageActionUrlAuth: { [weak self] defaultUrl, subject in
|
||||||
if let strongSelf = self {
|
if let strongSelf = self {
|
||||||
guard strongSelf.presentationInterfaceState.subject != .scheduledMessages else {
|
guard strongSelf.presentationInterfaceState.subject != .scheduledMessages else {
|
||||||
@ -2449,9 +2457,19 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, openCheckoutOrReceipt: { [weak self] messageId in
|
}, openCheckoutOrReceipt: { [weak self] messageId in
|
||||||
if let strongSelf = self {
|
guard let strongSelf = self else {
|
||||||
|
return
|
||||||
|
}
|
||||||
strongSelf.commitPurposefulAction()
|
strongSelf.commitPurposefulAction()
|
||||||
if let message = strongSelf.chatDisplayNode.historyNode.messageInCurrentHistoryView(messageId) {
|
|
||||||
|
let _ = (strongSelf.context.account.postbox.transaction { transaction -> Message? in
|
||||||
|
return transaction.getMessage(messageId)
|
||||||
|
}
|
||||||
|
|> deliverOnMainQueue).start(next: { message in
|
||||||
|
guard let strongSelf = self, let message = message else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
for media in message.media {
|
for media in message.media {
|
||||||
if let invoice = media as? TelegramMediaInvoice {
|
if let invoice = media as? TelegramMediaInvoice {
|
||||||
strongSelf.chatDisplayNode.dismissInput()
|
strongSelf.chatDisplayNode.dismissInput()
|
||||||
@ -2483,8 +2501,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
}
|
|
||||||
}, openSearch: {
|
}, openSearch: {
|
||||||
}, setupReply: { [weak self] messageId in
|
}, setupReply: { [weak self] messageId in
|
||||||
self?.interfaceInteraction?.setupReplyMessage(messageId, { _ in })
|
self?.interfaceInteraction?.setupReplyMessage(messageId, { _ in })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user