mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-18 22:51:46 +02:00
Fixes mark as read when drafts are the latest message in the chat
This commit is contained in:
@@ -1084,6 +1084,13 @@ class AccountViewModel(
|
||||
account.markAsRead("Channel/${noteEvent.channelId()}", noteEvent.createdAt)
|
||||
} else if (noteEvent is ChatroomKeyable) {
|
||||
account.markAsRead("Room/${noteEvent.chatroomKey(account.signer.pubKey).hashCode()}", noteEvent.createdAt)
|
||||
} else if (noteEvent is DraftWrapEvent) {
|
||||
val innerEvent = account.draftsDecryptionCache.preCachedDraft(noteEvent)
|
||||
if (innerEvent is IsInPublicChatChannel) {
|
||||
account.markAsRead("Channel/${innerEvent.channelId()}", noteEvent.createdAt)
|
||||
} else if (innerEvent is ChatroomKeyable) {
|
||||
account.markAsRead("Room/${innerEvent.chatroomKey(account.signer.pubKey).hashCode()}", noteEvent.createdAt)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user