mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
chore(android): target API 36 with Expo 54
Upgrade the mobile native toolchain and Expo dependencies for Android 16 compatibility while preserving web and admin runtime isolation.
This commit is contained in:
1 parent
aacb4f8731
commit
61ec3692b7
27 files changed
+3867
-5535
No files matched your search
@@ -12,20 +12,37 @@ import { useMatchStore } from "../store/matchStore";
|
||||
// Configure notification behavior for foreground
|
||||
// We don't show system alerts since the app handles notifications with in-app toasts
|
||||
Notifications.setNotificationHandler({
|
||||
handleNotification: async () => ({
|
||||
shouldShowAlert: false,
|
||||
shouldPlaySound: false,
|
||||
handleNotification: async () => ({
|
||||
shouldShowAlert: false,
|
||||
shouldShowBanner: false,
|
||||
shouldShowList: false,
|
||||
shouldPlaySound: false,
|
||||
shouldSetBadge: false,
|
||||
}),
|
||||
});
|
||||
|
||||
// Types
|
||||
export interface NotificationData {
|
||||
export interface NotificationData {
|
||||
type: "match" | "message" | "match_digest" | "partner_activity" | "nudge" | "weekly_summary";
|
||||
match_id?: string;
|
||||
message_id?: string;
|
||||
count?: number;
|
||||
}
|
||||
}
|
||||
|
||||
const notificationTypes = new Set<NotificationData["type"]>([
|
||||
"match",
|
||||
"message",
|
||||
"match_digest",
|
||||
"partner_activity",
|
||||
"nudge",
|
||||
"weekly_summary",
|
||||
]);
|
||||
|
||||
function isNotificationData(value: unknown): value is NotificationData {
|
||||
if (!value || typeof value !== "object") return false;
|
||||
const type = (value as { type?: unknown }).type;
|
||||
return typeof type === "string" && notificationTypes.has(type as NotificationData["type"]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -219,9 +236,9 @@ export async function checkAndRegisterPushToken(userId: string): Promise<boolean
|
||||
export function handleNotificationResponse(
|
||||
response: Notifications.NotificationResponse
|
||||
): void {
|
||||
const data = response.notification.request.content.data as NotificationData;
|
||||
|
||||
if (!data) {
|
||||
const data = response.notification.request.content.data;
|
||||
|
||||
if (!isNotificationData(data)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user