diff options
| author | Mohamed Bassem <me@mbassem.com> | 2026-02-01 15:59:11 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2026-02-01 15:59:11 +0000 |
| commit | fdc53eee79fdb5033b9ab46e6969917f6cd59bb0 (patch) | |
| tree | 44d923bf2d2482cfabcffdadc48a0c2ab537685b /apps/mobile/lib | |
| parent | 15d9d9897487d5e1881f75a4d92af37f6937eb80 (diff) | |
| download | karakeep-fdc53eee79fdb5033b9ab46e6969917f6cd59bb0.tar.zst | |
fix(mobile): fix some mobile warning after expo 54 upgrade
Diffstat (limited to 'apps/mobile/lib')
| -rw-r--r-- | apps/mobile/lib/settings.ts | 7 | ||||
| -rw-r--r-- | apps/mobile/lib/useColorScheme.tsx | 12 |
2 files changed, 10 insertions, 9 deletions
diff --git a/apps/mobile/lib/settings.ts b/apps/mobile/lib/settings.ts index 745c778d..8da1d33d 100644 --- a/apps/mobile/lib/settings.ts +++ b/apps/mobile/lib/settings.ts @@ -1,3 +1,4 @@ +import { useEffect } from "react"; import * as SecureStore from "expo-secure-store"; import { z } from "zod"; import { create } from "zustand"; @@ -77,6 +78,12 @@ const useSettings = create<AppSettingsState>((set, get) => ({ export default function useAppSettings() { const { settings, setSettings, load } = useSettings(); + useEffect(() => { + if (settings.isLoading) { + load(); + } + }, [load, settings.isLoading]); + return { ...settings, setSettings, load }; } diff --git a/apps/mobile/lib/useColorScheme.tsx b/apps/mobile/lib/useColorScheme.tsx index a00a445d..40e7ad53 100644 --- a/apps/mobile/lib/useColorScheme.tsx +++ b/apps/mobile/lib/useColorScheme.tsx @@ -46,13 +46,7 @@ function useInitialAndroidBarSync() { export { useColorScheme, useInitialAndroidBarSync }; function setNavigationBar(colorScheme: "light" | "dark") { - return Promise.all([ - NavigationBar.setButtonStyleAsync( - colorScheme === "dark" ? "light" : "dark", - ), - NavigationBar.setPositionAsync("absolute"), - NavigationBar.setBackgroundColorAsync( - colorScheme === "dark" ? "#00000030" : "#ffffff80", - ), - ]); + return NavigationBar.setButtonStyleAsync( + colorScheme === "dark" ? "light" : "dark", + ); } |
