mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 03:18:06 +00:00
Prevent replying to retracted message with swipe action
This commit is contained in:
parent
88e474533e
commit
696a593cbc
1 changed files with 7 additions and 3 deletions
|
|
@ -474,9 +474,13 @@ open class ConversationFragment : SlidingPaneChildFragment() {
|
|||
val chatMessageEventLog = adapter.currentList[index]
|
||||
val chatMessageModel = (chatMessageEventLog.model as? MessageModel)
|
||||
if (chatMessageModel != null) {
|
||||
sendMessageViewModel.replyToMessage(chatMessageModel)
|
||||
// Open keyboard & focus edit text
|
||||
binding.sendArea.messageToSend.showKeyboard()
|
||||
if (chatMessageModel.hasBeenRetracted.value == true) { // Don't allow to reply to retracted messages
|
||||
// TODO: notify user?
|
||||
} else {
|
||||
sendMessageViewModel.replyToMessage(chatMessageModel)
|
||||
// Open keyboard & focus edit text
|
||||
binding.sendArea.messageToSend.showKeyboard()
|
||||
}
|
||||
} else {
|
||||
Log.e(
|
||||
"$TAG Can't reply, failed to get a ChatMessageModel from adapter item #[$index]"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue