mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
Update
This commit is contained in:
1 parent
d1a2032724
commit
dfcf0ba289
10 files changed
+630
-28
No files matched your search
@@ -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") {
|
||||
|
||||
Reference in new issue
Block a user