mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-01-15 23:59:08 +00:00
fix: project id notifications
This commit is contained in:
5
app.json
5
app.json
@@ -129,10 +129,7 @@
|
|||||||
"expo-notifications",
|
"expo-notifications",
|
||||||
{
|
{
|
||||||
"icon": "./assets/images/notification.png",
|
"icon": "./assets/images/notification.png",
|
||||||
"color": "#9333EA",
|
"color": "#9333EA"
|
||||||
"android": {
|
|
||||||
"projectId": "streamyfin-4fec1"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"expo-web-browser",
|
"expo-web-browser",
|
||||||
|
|||||||
@@ -255,9 +255,19 @@ function Layout() {
|
|||||||
|
|
||||||
// only create push token for real devices (pointless for emulators)
|
// only create push token for real devices (pointless for emulators)
|
||||||
if (Device.isDevice) {
|
if (Device.isDevice) {
|
||||||
Notifications?.getExpoPushTokenAsync()
|
Notifications?.getExpoPushTokenAsync({
|
||||||
.then((token: ExpoPushToken) => token && setExpoPushToken(token))
|
projectId: "e79219d1-797f-4fbe-9fa1-cfd360690a68",
|
||||||
.catch((reason: any) => console.log("Failed to get token", reason));
|
})
|
||||||
|
.then((token: ExpoPushToken) => {
|
||||||
|
if (token) {
|
||||||
|
console.log("Expo push token obtained:", token.data);
|
||||||
|
setExpoPushToken(token);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((reason: any) => {
|
||||||
|
console.error("Failed to get push token:", reason);
|
||||||
|
writeErrorLog("Failed to get Expo push token", reason);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}, [user]);
|
}, [user]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user