This commit is contained in:
Jamie Brunton committed 2025-12-31 09:40:27 +00:00
1 parent d1a2032724
commit dfcf0ba289
10 files changed
+630 -28

No files matched your search

+7
View File
@@ -4,6 +4,7 @@ import { Platform } from "react-native";
import { router } from "expo-router";
import { supabase } from "./supabase";
import { captureError } from "./sentry";
import { Events } from "./analytics";
// Configure notification behavior for foreground
// We don't show system alerts since the app handles notifications with in-app toasts
@@ -41,6 +42,12 @@ export async function registerForPushNotificationsAsync(): Promise<string | null
if (existingStatus !== "granted") {
const { status } = await Notifications.requestPermissionsAsync();
finalStatus = status;
// Track permission result (only when we actually requested)
if (status === "granted") {
Events.notificationPermissionGranted();
} else {
Events.notificationPermissionDenied();
}
}
if (finalStatus !== "granted") {