Compare commits

..

2 Commits

Author SHA1 Message Date
renovate[bot]
ebf0efd149 chore(deps): Update expo monorepo to v55 2026-03-19 08:41:42 +00:00
Alex Collado
564a593a3a fix: Close modal when back button is pressed on Android (#1487)
Some checks failed
🌐 Translation Sync / sync-translations (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Vulnerable Dependencies (push) Has been cancelled
🚦 Security & Quality Gate / 🚑 Expo Doctor Check (push) Has been cancelled
🏗️ Build Apps / 🤖 Build Android APK (Phone) (push) Has been cancelled
🏗️ Build Apps / 🤖 Build Android APK (TV) (push) Has been cancelled
🏗️ Build Apps / 🍎 Build iOS IPA (Phone) (push) Has been cancelled
🏗️ Build Apps / 🍎 Build iOS IPA (Phone - Unsigned) (push) Has been cancelled
🔒 Lockfile Consistency Check / 🔍 Check bun.lock and package.json consistency (push) Has been cancelled
🛡️ CodeQL Analysis / 🔎 Analyze with CodeQL (actions) (push) Has been cancelled
🛡️ CodeQL Analysis / 🔎 Analyze with CodeQL (javascript-typescript) (push) Has been cancelled
🏷️🔀Merge Conflict Labeler / 🏷️ Labeling Merge Conflicts (push) Has been cancelled
🚦 Security & Quality Gate / 📝 Validate PR Title (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Lint & Test (check) (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Lint & Test (format) (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Lint & Test (lint) (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Lint & Test (typecheck) (push) Has been cancelled
2026-03-12 13:45:17 +01:00
3 changed files with 232 additions and 376 deletions

524
bun.lock

File diff suppressed because it is too large Load Diff

View File

@@ -27,9 +27,9 @@
"dependencies": {
"@bottom-tabs/react-navigation": "1.1.0",
"@douglowder/expo-av-route-picker-view": "^0.0.5",
"@expo/metro-runtime": "~6.1.1",
"@expo/metro-runtime": "~55.0.0",
"@expo/react-native-action-sheet": "^4.1.1",
"@expo/ui": "0.2.0-beta.9",
"@expo/ui": "55.0.2",
"@expo/vector-icons": "^15.0.3",
"@gorhom/bottom-sheet": "5.2.8",
"@jellyfin/sdk": "^0.13.0",
@@ -42,34 +42,34 @@
"@tanstack/react-query": "5.90.20",
"@tanstack/react-query-persist-client": "^5.90.18",
"axios": "^1.7.9",
"expo": "~54.0.31",
"expo-application": "~7.0.8",
"expo-asset": "~12.0.12",
"expo-background-task": "~1.0.10",
"expo-blur": "~15.0.8",
"expo-brightness": "~14.0.8",
"expo-build-properties": "~1.0.10",
"expo-constants": "18.0.13",
"expo-crypto": "^15.0.8",
"expo-dev-client": "~6.0.20",
"expo-device": "~8.0.10",
"expo-font": "~14.0.10",
"expo-haptics": "~15.0.8",
"expo-image": "~3.0.11",
"expo-linear-gradient": "~15.0.8",
"expo-linking": "~8.0.11",
"expo-localization": "~17.0.8",
"expo-location": "^19.0.8",
"expo-notifications": "~0.32.16",
"expo-router": "~6.0.21",
"expo-screen-orientation": "~9.0.8",
"expo-secure-store": "^15.0.8",
"expo-sharing": "~14.0.8",
"expo-splash-screen": "~31.0.13",
"expo-status-bar": "~3.0.9",
"expo-system-ui": "~6.0.9",
"expo-task-manager": "14.0.9",
"expo-web-browser": "~15.0.10",
"expo": "~55.0.0",
"expo-application": "~55.0.0",
"expo-asset": "~55.0.0",
"expo-background-task": "~55.0.0",
"expo-blur": "~55.0.0",
"expo-brightness": "~55.0.0",
"expo-build-properties": "~55.0.0",
"expo-constants": "55.0.7",
"expo-crypto": "^55.0.0",
"expo-dev-client": "~55.0.0",
"expo-device": "~55.0.0",
"expo-font": "~55.0.0",
"expo-haptics": "~55.0.0",
"expo-image": "~55.0.0",
"expo-linear-gradient": "~55.0.0",
"expo-linking": "~55.0.0",
"expo-localization": "~55.0.0",
"expo-location": "^55.0.0",
"expo-notifications": "~55.0.0",
"expo-router": "~55.0.0",
"expo-screen-orientation": "~55.0.0",
"expo-secure-store": "^55.0.0",
"expo-sharing": "~55.0.0",
"expo-splash-screen": "~55.0.0",
"expo-status-bar": "~55.0.0",
"expo-system-ui": "~55.0.0",
"expo-task-manager": "55.0.9",
"expo-web-browser": "~55.0.0",
"i18next": "^25.0.0",
"jotai": "2.16.2",
"lodash": "4.17.23",
@@ -160,6 +160,6 @@
"unrs-resolver"
],
"resolutions": {
"expo-constants": "18.0.13"
"expo-constants": "55.0.7"
}
}

View File

@@ -5,10 +5,13 @@ import {
type ReactNode,
useCallback,
useContext,
useEffect,
useRef,
useState,
} from "react";
import { BackHandler, Platform } from "react-native";
interface ModalOptions {
enableDynamicSizing?: boolean;
snapPoints?: (string | number)[];
@@ -73,6 +76,25 @@ export const GlobalModalProvider: React.FC<GlobalModalProviderProps> = ({
});
}, []);
useEffect(() => {
if (Platform.OS !== "android") return;
const onBackPress = () => {
if (isVisible) {
hideModal();
return true;
}
return false;
};
const subscription = BackHandler.addEventListener(
"hardwareBackPress",
onBackPress,
);
return () => subscription.remove();
}, [isVisible, hideModal]);
const value = {
showModal,
hideModal,