Push notification & session management cleanup (#92)

* Add some temporary logging to help suss out the session drop issue

* Fix to session resumption: copy session tokens during a resumeSession attempt

* Factor out notifee display into a lib and add to storybook

* Tune the bg notifications fetch to only get what is needed

* Fix: run account update inside a mobx action

* Remove debugging logs for sessions

* Fixes to bg notifications fetch
This commit is contained in:
Paul Frazee 2023-01-25 11:31:09 -06:00 committed by GitHub
parent 079e1dbe18
commit 5f18931915
7 changed files with 148 additions and 66 deletions

View file

@ -136,8 +136,7 @@ export class RootStoreModel {
async onBgFetch(taskId: string) {
this.log.debug(`Background fetch fired for task ${taskId}`)
if (this.session.hasSession) {
// grab notifications
await this.me.fetchNotifications()
await this.me.bgFetchNotifications()
}
BackgroundFetch.finish(taskId)
}