Add a shared NotificationCountBadge view

Extract the unread notification count capsule from the room list cell into
its own view so it can be reused elsewhere. It caps the displayed value at
99+ and comes in a medium size (used by the room list) and a small size.
This commit is contained in:
Stefan Ceriu
2026-10-08 14:30:20 +03:00
parent 2182446684
commit 61fe2a8158
10 changed files with 77 additions and 11 deletions
@@ -711,6 +711,13 @@ extension PreviewTests {
}
}
@Test
func notificationCountBadge() async throws {
for (index, preview) in NotificationCountBadge_Previews._allPreviews.enumerated() {
try await assertSnapshots(matching: preview, step: index)
}
}
@Test
func notificationPermissionsScreen() async throws {
for (index, preview) in NotificationPermissionsScreen_Previews._allPreviews.enumerated() {
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e1b9fdaf8ac1653153e78faa59162c930af5e5f6d647293ea907840f436f97b8
size 73171
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cdd5c07929cc8ac34ba855e4143f2ab1c23bde0c0780acfdf885e50c486733dc
size 74808
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:09a997528760f172b9b41994487e309e8958e7dd2404585bc7535a9f0f0b160a
size 33306
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c058780bc218c210e7b1b12efd2838f332091103246cdebfb7a2f717dbfb2d9c
size 34183