We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b85a8d commit 7444a81Copy full SHA for 7444a81
1 file changed
apps/mobile/src/initialize/background.ts
@@ -7,14 +7,13 @@ import { whoami } from "../store/user/getters"
7
const BACKGROUND_FETCH_TASK = "background-fetch"
8
9
export async function initBackgroundFetch() {
10
- const user = whoami()
11
- if (!user) {
12
- return
13
- }
14
-
15
TaskManager.defineTask(BACKGROUND_FETCH_TASK, async () => {
16
// const now = Date.now()
17
// console.log(`Got background fetch call at date: ${new Date(now).toISOString()}`)
+ const user = whoami()
+ if (!user) {
+ return BackgroundFetch.BackgroundFetchResult.NoData
+ }
18
19
try {
20
const res = await unreadSyncService.updateBadgeAtBackground()
0 commit comments