fix to remove temp message in thread after sending

threadId was not set for temp message...

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2025-07-11 23:00:04 +02:00
parent ec9c018864
commit 8c8bee3fe9
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B
2 changed files with 7 additions and 1 deletions

View File

@ -857,9 +857,14 @@ class MessageInputFragment : Fragment() {
replaceMentionChipSpans(editable)
binding.fragmentMessageInputView.inputEditText?.setText("")
sendStopTypingMessage()
val replyMessageId = binding.fragmentMessageInputView
var replyMessageId = binding.fragmentMessageInputView
.findViewById<RelativeLayout>(R.id.quotedChatMessageView)?.tag as Int? ?: 0
if (replyMessageId == 0) {
replyMessageId = chatActivity.thread?.last?.id?.toInt() ?: 0
}
sendMessage(
editable.toString(),
replyMessageId,

View File

@ -1063,6 +1063,7 @@ class OfflineFirstChatRepository @Inject constructor(
internalId = "$internalConversationId@_temp_$currentTimeMillies",
internalConversationId = internalConversationId,
id = currentTimeWithoutYear.toLong(),
threadId = threadId,
message = message,
deleted = false,
token = conversationModel.token,