|
@@ -184,6 +184,10 @@ const Route = () => {
|
|
|
|
|
|
const checkTokenAndUpdate = async () => {
|
|
const checkTokenAndUpdate = async () => {
|
|
const storedToken = storage.get('deviceToken', StoreType.STRING);
|
|
const storedToken = storage.get('deviceToken', StoreType.STRING);
|
|
|
|
+ const { status } = await Notifications.getPermissionsAsync();
|
|
|
|
+ if (status !== 'granted') {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
const currentToken = await Notifications.getDevicePushTokenAsync();
|
|
const currentToken = await Notifications.getDevicePushTokenAsync();
|
|
|
|
|
|
if (storedToken && currentToken?.data !== storedToken) {
|
|
if (storedToken && currentToken?.data !== storedToken) {
|