Always update unreadCount for conversations
This commit is contained in:
parent
794d910d4e
commit
215d90fbe8
3 changed files with 29 additions and 19 deletions
|
@ -13,7 +13,6 @@ export async function markConversationRead(
|
|||
}
|
||||
): Promise<boolean> {
|
||||
const { id: conversationId } = conversationAttrs;
|
||||
window.Whisper.Notifications.removeBy({ conversationId });
|
||||
|
||||
const [unreadMessages, unreadReactions] = await Promise.all([
|
||||
window.Signal.Data.getUnreadByConversationAndMarkRead(
|
||||
|
@ -27,10 +26,19 @@ export async function markConversationRead(
|
|||
),
|
||||
]);
|
||||
|
||||
window.log.info('markConversationRead', {
|
||||
conversationId,
|
||||
newestUnreadId,
|
||||
unreadMessages: unreadMessages.length,
|
||||
unreadReactions: unreadReactions.length,
|
||||
});
|
||||
|
||||
if (!unreadMessages.length && !unreadReactions.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
window.Whisper.Notifications.removeBy({ conversationId });
|
||||
|
||||
const unreadReactionSyncData = new Map<
|
||||
string,
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue