Merge branch 'master' into notifications

This commit is contained in:
Márton Kiss
2023-06-10 22:46:40 +02:00
committed by GitHub
23 changed files with 551 additions and 243 deletions

View File

@@ -157,11 +157,15 @@ void backgroundHeadlessTask(HeadlessTask task) {
String taskId = task.taskId;
bool isTimeout = task.timeout;
if (isTimeout) {
print("[BackgroundFetch] Headless task timed-out: $taskId");
if (kDebugMode) {
print("[BackgroundFetch] Headless task timed-out: $taskId");
}
BackgroundFetch.finish(taskId);
return;
}
print('[BackgroundFetch] Headless event received.');
if (kDebugMode) {
print('[BackgroundFetch] Headless event received.');
}
NotificationsHelper().backgroundJob();
BackgroundFetch.finish(task.taskId);
}