From f3b77b8547b20e9ebd4c173817ace22b9004e37c Mon Sep 17 00:00:00 2001 From: Fredrik Burmester Date: Fri, 21 Feb 2025 10:49:02 +0100 Subject: [PATCH] fix: return correct type for notifications to work --- app/_layout.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/_layout.tsx b/app/_layout.tsx index bf308c78..fd71bec4 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -120,7 +120,11 @@ if (!Platform.isTV) { if (!token || !url || !user?.Id) return; - fetchAndStoreRecentlyAdded(user.Id, url, token); + const result = await fetchAndStoreRecentlyAdded(user.Id, url, token); + + if (!result) return BackgroundFetch.BackgroundFetchResult.NoData; + + return BackgroundFetch.BackgroundFetchResult.NewData; }); TaskManager.defineTask(BACKGROUND_FETCH_TASK, async () => {