Set the dock badge in one place

The sidebar already follows the count, so the inbox and the poll don't need to set it too.
This commit is contained in:
Rūdolfs Ošiņš
2026-10-01 18:20:25 +02:00
parent 7a42679bdf
commit 05b6e01dc8
4 changed files with 39 additions and 35 deletions
+11
View File
@@ -0,0 +1,11 @@
import { expect, test } from "vitest";
import { badgeCount } from "@app/lib/notificationCount.svelte";
test.each([
[3, true, 3],
[0, true, undefined],
[3, false, undefined],
])("%j notifications with the badge on %j show %j", (count, on, expected) => {
expect(badgeCount(count, on)).toBe(expected);
});