Skip to content
This repository was archived by the owner on Aug 30, 2025. It is now read-only.

Commit 7b0a45a

Browse files
committed
fix: utilisation de BackHandler de react-native à la place
1 parent 9531670 commit 7b0a45a

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

package-lock.json

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@
100100
"react-native-pressable-scale": "^2.1.0",
101101
"react-native-qrcode-svg": "^6.3.1",
102102
"react-native-reanimated": "~3.10.1",
103-
"react-native-restart": "^0.0.27",
104103
"react-native-safe-area-context": "4.10.5",
105104
"react-native-screens": "^4.9.1",
106105
"react-native-share": "^12.0.3",

src/views/settings/SettingsIcons.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useEffect } from "react";
2-
import { Text, ScrollView, View, TouchableOpacity, Image, Platform } from "react-native";
2+
import { Text, ScrollView, View, TouchableOpacity, Image, Platform, BackHandler } from "react-native";
33
import type { Screen } from "@/router/helpers/types";
44
import { usePapillonTheme as useTheme } from "@/utils/ui/theme";
55
import { BadgeInfo, RefreshCcw, Sparkles } from "lucide-react-native";
@@ -14,7 +14,6 @@ import { getActiveIcon, resetIcon, setIcon } from "react-native-app-icon-changer
1414
import PapillonCheckbox from "@/components/Global/PapillonCheckbox";
1515
import { alertExpoGo, isExpoGo } from "@/utils/native/expoGoAlert";
1616
import { useAlert } from "@/providers/AlertProvider";
17-
import RNRestart from "react-native-restart";
1817

1918
type Icon = {
2019
id: string;
@@ -94,7 +93,7 @@ const SettingsIcons: Screen<"SettingsIcons"> = () => {
9493
setDisableChoise(true);
9594

9695
setTimeout(() => {
97-
RNRestart.restart();
96+
BackHandler.exitApp();
9897
}, 300);
9998
} catch (e) {
10099
console.error("Erreur lors du changement d'icône", e);

0 commit comments

Comments
 (0)