Multiple notifications fixes (#2154)
* Dont reset notifications feed on push notification event * Dont separate notifications by read state to avoid jank * On notifications screen focus, check latest and only rerender if not scrolled down * Reuse the cached notifs page when its not stale * Bump ios build number * Improve comments * Change the 'mark all read' condition to avoid firing too early
This commit is contained in:
parent
d854e88218
commit
6b3eb401b0
12 changed files with 162 additions and 146 deletions
|
@ -81,6 +81,7 @@ export function registerTokenChangeHandler(
|
|||
|
||||
export function init(queryClient: QueryClient) {
|
||||
// handle notifications that are received, both in the foreground or background
|
||||
// NOTE: currently just here for debug logging
|
||||
Notifications.addNotificationReceivedListener(event => {
|
||||
logger.debug(
|
||||
'Notifications: received',
|
||||
|
@ -88,8 +89,6 @@ export function init(queryClient: QueryClient) {
|
|||
logger.DebugContext.notifications,
|
||||
)
|
||||
if (event.request.trigger.type === 'push') {
|
||||
// refresh notifications in the background
|
||||
truncateAndInvalidate(queryClient, RQKEY_NOTIFS())
|
||||
// handle payload-based deeplinks
|
||||
let payload
|
||||
if (isIOS) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue