Skip to content

Commit 1eeb35d

Browse files
committed
fix spash screen; expo upgrade; fix manuel server navigation
1 parent 7e17f50 commit 1eeb35d

File tree

7 files changed

+254
-210
lines changed

7 files changed

+254
-210
lines changed

assets/icon-solid-dark.svg

Lines changed: 9 additions & 0 deletions
Loading

assets/splash-icon-dark.png

-950 Bytes
Loading

assets/splash-icon-light.png

2.85 KB
Loading

package-lock.json

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

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@
2929
"@ui-kitten/eva-icons": "^5.3.1",
3030
"axios": "^1.12.0",
3131
"base-64": "^1.0.0",
32-
"expo": "^54.0.7",
33-
"expo-build-properties": "~1.0.8",
34-
"expo-dev-client": "~6.0.12",
32+
"expo": "^54.0.12",
33+
"expo-build-properties": "~1.0.9",
34+
"expo-dev-client": "~6.0.13",
3535
"expo-file-system": "~19.0.12",
3636
"expo-linking": "~8.0.8",
3737
"expo-localization": "~17.0.7",
3838
"expo-sharing": "~14.0.7",
3939
"expo-splash-screen": "~31.0.9",
4040
"expo-status-bar": "~3.0.8",
4141
"expo-system-ui": "~6.0.7",
42-
"expo-web-browser": "~15.0.7",
42+
"expo-web-browser": "~15.0.8",
4343
"i18next": "^24.1.0",
4444
"react": "19.1.0",
4545
"react-dom": "19.1.0",
@@ -88,4 +88,4 @@
8888
}
8989
},
9090
"private": true
91-
}
91+
}

screens/ServerManualScreen.tsx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function ServerManualScreen({
1313
navigation,
1414
}: NativeStackScreenProps<RootStackParamList, "ServerManual">) {
1515
const { t } = useTranslation();
16-
const { updateServerUrl } = useAppContext();
16+
const { serverUrl, updateServerUrl } = useAppContext();
1717

1818
const { url: initialUrl = "", username, password } = route.params || {};
1919

@@ -30,14 +30,19 @@ function ServerManualScreen({
3030
}, [initialUrl, username, password]);
3131

3232
const serverSelected = React.useCallback(
33-
(nextUrl: string, nextBasicAuth: BasicAuth) => {
33+
async (nextUrl: string, nextBasicAuth: BasicAuth) => {
3434
console.log("serverSelected");
3535
setUrl(nextUrl);
3636
setBasicAuth(nextBasicAuth);
37-
updateServerUrl(nextUrl, nextBasicAuth);
38-
navigation.navigate("Main");
37+
await updateServerUrl(nextUrl, nextBasicAuth);
38+
39+
// After setting serverUrl, navigate to Main which will be available in the new stack
40+
navigation.reset({
41+
index: 0,
42+
routes: [{ name: "Main" }],
43+
});
3944
},
40-
[updateServerUrl],
45+
[updateServerUrl, navigation],
4146
);
4247

4348
const memoizedHeader = React.useMemo(
@@ -49,12 +54,12 @@ function ServerManualScreen({
4954
if (navigation.canGoBack()) {
5055
navigation.goBack();
5156
} else {
52-
navigation.navigate("Main");
57+
navigation.navigate(serverUrl ? "Main" : "Server");
5358
}
5459
}}
5560
/>
5661
),
57-
[navigation, t],
62+
[navigation, serverUrl, t],
5863
);
5964

6065
return (

screens/SettingsScreen.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ function SettingsScreen({
1919
const saveServer = React.useCallback(
2020
(url: string, basicAuth: BasicAuth) => {
2121
updateServerUrl(url, basicAuth);
22+
if (navigation.canGoBack()) {
23+
navigation.goBack();
24+
}
2225
},
2326
[navigation, updateServerUrl],
2427
);
@@ -31,7 +34,7 @@ function SettingsScreen({
3134
serverSelected={saveServer}
3235
/>
3336
),
34-
[serverUrl, saveServer],
37+
[serverUrl, basicAuth, saveServer],
3538
);
3639

3740
const openGitHubReleases = () => {

0 commit comments

Comments
 (0)