Skip to content

Commit

Permalink
Displaying quick reply buttons when minimize and history loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
KartheekPa-Kore committed Oct 28, 2024
1 parent 5ede58f commit 30d244d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Sources/KoreBotSDK/AppKit/Common/KABotClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,9 @@ open class KABotClient: NSObject {
}
var allMessages: [Message] = [Message]()
var removeTemplate = false
var i = 0
for message in botMessages {
i += 1
removeTemplate = false
if message.type == "outgoing" || message.type == "incoming" {
guard let components = message.components, let data = components.first?.data else {
Expand Down Expand Up @@ -946,7 +948,15 @@ open class KABotClient: NSObject {
let messageTuple = onReceiveMessage(object: botMessage)
if let object = messageTuple.0 {
if !removeTemplate{
arrayOfSelectedBtnIndex.insert(1001, at: 0)
if botMessages.count == i{
if !isShowQuickRepliesBottom{
arrayOfSelectedBtnIndex.insert(1000, at: 0)
}else{
arrayOfSelectedBtnIndex.insert(1001, at: 0)
}
}else{
arrayOfSelectedBtnIndex.insert(1001, at: 0)
}
allMessages.append(object)
}
}
Expand Down

0 comments on commit 30d244d

Please sign in to comment.