A couple notifications fixes (#2327)
* Clear the app badge notif count on markallread * Fix like notifications on custom feeds
This commit is contained in:
parent
3b240db0c0
commit
6e001dbf1c
3 changed files with 22 additions and 3 deletions
|
@ -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} = {}) {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue