feat(app): wrap root in GestureHandlerRootView for gesture support

This commit is contained in:
2026-08-08 23:27:58 +02:00
parent 284fd22c13
commit eeb3069750
3 changed files with 1368 additions and 281 deletions
+3
View File
@@ -2,6 +2,7 @@ import "./global.css";
import "./src/i18n"; import "./src/i18n";
import { StatusBar } from "expo-status-bar"; import { StatusBar } from "expo-status-bar";
import { NavigationContainer } from "@react-navigation/native"; import { NavigationContainer } from "@react-navigation/native";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import { RootNavigator } from "./src/navigation/RootNavigator"; import { RootNavigator } from "./src/navigation/RootNavigator";
import { DatabaseProvider } from "./src/providers/DatabaseProvider"; import { DatabaseProvider } from "./src/providers/DatabaseProvider";
import { SettingsProvider } from "./src/providers/WatchProvider"; import { SettingsProvider } from "./src/providers/WatchProvider";
@@ -27,6 +28,7 @@ function SystemLanguageListener() {
function App() { function App() {
return ( return (
<GestureHandlerRootView style={{ flex: 1 }}>
<DatabaseProvider> <DatabaseProvider>
<SettingsProvider> <SettingsProvider>
<NavigationContainer> <NavigationContainer>
@@ -37,6 +39,7 @@ function App() {
</NavigationContainer> </NavigationContainer>
</SettingsProvider> </SettingsProvider>
</DatabaseProvider> </DatabaseProvider>
</GestureHandlerRootView>
); );
} }
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -280,7 +280,7 @@ class WorkoutManager: ObservableObject {
if let query = heartRateQuery { if let query = heartRateQuery {
healthStore.execute(query) healthStore.execute(query)
healthStore.enableBackgroundDelivery(for: heartRateType, frequency: .immediate) { _, _, _ in } healthStore.enableBackgroundDelivery(for: heartRateType, frequency: .immediate) { _, _ in }
} }
} }
@@ -321,7 +321,7 @@ class WorkoutManager: ObservableObject {
if let query = calorieQuery { if let query = calorieQuery {
healthStore.execute(query) healthStore.execute(query)
healthStore.enableBackgroundDelivery(for: calorieType, frequency: .immediate) { _, _, _ in } healthStore.enableBackgroundDelivery(for: calorieType, frequency: .immediate) { _, _ in }
} }
} }