fix(edit): don't send new message event on edits
Fixes #10108 We were sending SIGNAL_NEW_MESSAGE_RECEIVED and SIGNAL_MESSAGE_EDITED, but the former is not needed, because the message editing is all done with the latter. The new message signal was sending the OS notification, which is not wanted, plus it did some useless processing, like trying to re-edit the message model, when it was already done.
This commit is contained in:
parent
de5f0cb960
commit
e86a625b92
|
@ -248,17 +248,17 @@ QtObject:
|
|||
continue
|
||||
|
||||
# Ignore messages older than current chat cursor
|
||||
if(self.isChatCursorInitialized(chatId)):
|
||||
if self.isChatCursorInitialized(chatId):
|
||||
let currentChatCursor = self.initOrGetMessageCursor(chatId)
|
||||
let msgCursorValue = initCursorValue(msg.id, msg.clock)
|
||||
if(not currentChatCursor.isLessThan(msgCursorValue)):
|
||||
currentChatCursor.makeObsolete()
|
||||
continue
|
||||
|
||||
if(msg.editedAt > 0):
|
||||
if msg.editedAt > 0:
|
||||
let data = MessageEditedArgs(chatId: msg.localChatId, message: msg)
|
||||
self.events.emit(SIGNAL_MESSAGE_EDITED, data)
|
||||
|
||||
else:
|
||||
chatMessages.add(msg)
|
||||
|
||||
let data = MessagesArgs(
|
||||
|
|
Loading…
Reference in New Issue