diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-12-27 08:47:45 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-27 08:47:45 -0800 |
commit | 6e001dbf1ce87f00f064a1a9f772c19185179f0e (patch) | |
tree | d9d3c4d525a017a54ff3dedc13006b6b32767630 /src/state/queries | |
parent | 3b240db0c06b9cdc560fb0a1123405e28a0218ac (diff) | |
download | voidsky-6e001dbf1ce87f00f064a1a9f772c19185179f0e.tar.zst |
A couple notifications fixes (#2327)
* Clear the app badge notif count on markallread * Fix like notifications on custom feeds
Diffstat (limited to 'src/state/queries')
-rw-r--r-- | src/state/queries/notifications/unread.tsx | 3 | ||||
-rw-r--r-- | src/state/queries/notifications/util.ts | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/state/queries/notifications/unread.tsx b/src/state/queries/notifications/unread.tsx index a189f20e4..abaabbf0e 100644 --- a/src/state/queries/notifications/unread.tsx +++ b/src/state/queries/notifications/unread.tsx @@ -89,6 +89,9 @@ export function Provider({children}: React.PropsWithChildren<{}>) { // update & broadcast setNumUnread('') broadcast.postMessage({event: ''}) + if (isNative) { + Notifications.setBadgeCountAsync(0) + } }, async checkUnread({invalidate}: {invalidate?: boolean} = {}) { diff --git a/src/state/queries/notifications/util.ts b/src/state/queries/notifications/util.ts index 438879b7e..411a0f791 100644 --- a/src/state/queries/notifications/util.ts +++ b/src/state/queries/notifications/util.ts @@ -156,7 +156,7 @@ async function fetchSubjects( ): Promise<Map<string, AppBskyFeedDefs.PostView>> { const uris = new Set<string>() for (const notif of groupedNotifs) { - if (notif.subjectUri) { + if (notif.subjectUri && !notif.subjectUri.includes('feed.generator')) { uris.add(notif.subjectUri) } } @@ -216,6 +216,8 @@ function getSubjectUri( ? notif.record.subject?.uri : undefined } + } else if (type === 'feedgen-like') { + return notif.reasonSubject } } |