Chat folders: for unread, check setting and active notification profile

This commit is contained in:
Scott Nonnenberg
2025-11-06 07:06:52 +10:00
committed by GitHub
parent aa78798be6
commit 1925044e9d
7 changed files with 42 additions and 18 deletions

View File

@@ -90,7 +90,10 @@ describe('countUnreadStats', () => {
expected: boolean,
includeMuted: UnreadStatsIncludeMuted = 'force-include'
) {
const actual = _canCountConversation(mockChat(chat), { includeMuted });
const actual = _canCountConversation(mockChat(chat), {
activeProfile: undefined,
includeMuted,
});
assert.equal(actual, expected);
}
@@ -172,7 +175,10 @@ describe('countUnreadStats', () => {
expected: boolean,
includeMuted: UnreadStatsIncludeMuted = 'force-exclude'
) {
const actual = isConversationUnread(mockChat(chat), { includeMuted });
const actual = isConversationUnread(mockChat(chat), {
activeProfile: undefined,
includeMuted,
});
assert.equal(actual, expected);
}
@@ -213,6 +219,7 @@ describe('countUnreadStats', () => {
includeMuted: UnreadStatsIncludeMuted = 'force-exclude'
) {
const actual = countConversationUnreadStats(mockChat(chat), {
activeProfile: undefined,
includeMuted,
});
assert.deepEqual(actual, mockStats(expected));
@@ -252,6 +259,7 @@ describe('countUnreadStats', () => {
includeMuted: UnreadStatsIncludeMuted = 'force-exclude'
) {
const actual = countAllConversationsUnreadStats(chats.map(mockChat), {
activeProfile: undefined,
includeMuted,
});
assert.deepEqual(actual, mockStats(expected));
@@ -323,7 +331,7 @@ describe('countUnreadStats', () => {
const actual = countAllChatFoldersUnreadStats(
CurrentChatFolders.fromArray(folders),
chats.map(mockChat),
{ includeMuted }
{ activeProfile: undefined, includeMuted }
);
assert.deepEqual(actual, expected);