feat: bg location lost notify
This commit is contained in:
parent
9368ec440a
commit
f08bd08ece
2 changed files with 12 additions and 0 deletions
|
@ -86,6 +86,14 @@ export const generateSuggestKeepOpenContent = (data) => {
|
|||
};
|
||||
};
|
||||
|
||||
export const generateBackgroundGeolocationLostContent = (data) => {
|
||||
return {
|
||||
title: `Localisation en arrière-plan désactivée`,
|
||||
body: `Votre localisation en arrière-plan a été désactivée. Veuillez vérifier les paramètres de l'application.`,
|
||||
bigText: `Votre localisation en arrière-plan a été désactivée. Pour continuer à utiliser pleinement l'application, veuillez vérifier les paramètres de votre appareil.`,
|
||||
};
|
||||
};
|
||||
|
||||
export const getNotificationContent = (enumType, data) => {
|
||||
const type = kebabCase(enumType);
|
||||
|
||||
|
@ -106,6 +114,8 @@ export const getNotificationContent = (enumType, data) => {
|
|||
return generateSuggestCloseContent(data);
|
||||
case "suggest-keep-open":
|
||||
return generateSuggestKeepOpenContent(data);
|
||||
case "background-geolocation-lost":
|
||||
return generateBackgroundGeolocationLostContent(data);
|
||||
default:
|
||||
return { title: type, body: JSON.stringify(data) };
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { VirtualNotificationTypes } from "./virtualNotifications";
|
||||
import { getNotificationContent } from "./content";
|
||||
import openSettings from "~/lib/native/openSettings";
|
||||
|
||||
export const getNotificationColor = (notification, theme) => {
|
||||
const { colors } = theme;
|
||||
|
@ -82,6 +83,7 @@ export const createNotificationHandlers = (handlers) => {
|
|||
suggest_keep_open: async (data) => await openAlert({ data }),
|
||||
relative_invitation: async (data) => await openRelatives({ data }),
|
||||
relative_allow_ask: async (data) => await openRelatives({ data }),
|
||||
background_geolocation_lost: async (data) => openSettings(),
|
||||
};
|
||||
|
||||
return {
|
||||
|
|
Loading…
Add table
Reference in a new issue