From d2e089b9ab16dada74ad2502428701afebdf98c8 Mon Sep 17 00:00:00 2001 From: audric Date: Wed, 11 Aug 2021 14:21:40 +1000 Subject: [PATCH] do not count unread of muted conversation in count of total unread Relates #1840 --- app/sql.js | 3 +-- ts/state/selectors/conversations.ts | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/sql.js b/app/sql.js index a4973a281..97135ea85 100644 --- a/app/sql.js +++ b/app/sql.js @@ -224,8 +224,7 @@ function openAndMigrateDatabase(filePath, key) { keyDatabase(db, key); switchToWAL(db); migrateSchemaVersion(db); - // Because foreign key support is not enabled by default! // actually, Session does not care - // db.pragma('foreign_keys = ON'); + db.pragma('secure_delete = ON'); return db; } catch (error) { diff --git a/ts/state/selectors/conversations.ts b/ts/state/selectors/conversations.ts index c38ee8140..75974e653 100644 --- a/ts/state/selectors/conversations.ts +++ b/ts/state/selectors/conversations.ts @@ -179,7 +179,11 @@ export const _getLeftPaneLists = ( directConversations.push(conversation); } - if (unreadCount < 9 && conversation.unreadCount > 0) { + if ( + unreadCount < 9 && + conversation.unreadCount > 0 && + conversation.currentNotificationSetting !== 'disabled' + ) { unreadCount += conversation.unreadCount; }