mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Fix attach menu buttons
This commit is contained in:
@@ -12833,7 +12833,10 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
break
|
break
|
||||||
case .gift:
|
case .gift:
|
||||||
initialButton = .gift
|
initialButton = .gift
|
||||||
case let .bot(botId, _, _):
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
for bot in attachMenuBots.reversed() {
|
for bot in attachMenuBots.reversed() {
|
||||||
var peerType = peerType
|
var peerType = peerType
|
||||||
if bot.peer.id == peer.id {
|
if bot.peer.id == peer.id {
|
||||||
@@ -12844,13 +12847,15 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
if !bot.peerTypes.intersection(peerType).isEmpty {
|
if !bot.peerTypes.intersection(peerType).isEmpty {
|
||||||
buttons.insert(button, at: 1)
|
buttons.insert(button, at: 1)
|
||||||
|
|
||||||
|
if case let .bot(botId, _, _) = subject {
|
||||||
if initialButton == nil && bot.peer.id == botId {
|
if initialButton == nil && bot.peer.id == botId {
|
||||||
initialButton = button
|
initialButton = button
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
allButtons.insert(button, at: 1)
|
allButtons.insert(button, at: 1)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return (buttons, allButtons, initialButton)
|
return (buttons, allButtons, initialButton)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user