use dot shorthands where possible in notif code

This commit is contained in:
Henry Hiles 2026-11-25 15:28:51 -05:00
commit 2c1ccc4728
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -16,7 +16,7 @@ class ShownNotificationsHelper(final Ref ref) {
final shown = IMap<String, ISet<int>>.fromJson(
json.decode(await prefs.getString(_key) ?? "{}"),
(threadId) => threadId as String,
(ids) => ISet.fromJson(ids, (id) => id as int),
(ids) => .fromJson(ids, (id) => id as int),
);
await prefs.setString(
@ -33,7 +33,7 @@ class ShownNotificationsHelper(final Ref ref) {
(shown) => shown.update(
threadId,
(ids) => ids.add(id),
ifAbsent: () => ISet({id}),
ifAbsent: () => .new({id}),
),
);