mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
Refactor mobile to use OpenApi generated SDK (#336)
This commit is contained in:
parent
d69470e207
commit
ae7e582ec8
276 changed files with 14513 additions and 3003 deletions
|
|
@ -19,10 +19,13 @@ class SplashScreenPage extends HookConsumerWidget {
|
|||
Hive.box<HiveSavedLoginInfo>(hiveLoginInfoBox).get(savedLoginInfoKey);
|
||||
|
||||
void performLoggingIn() async {
|
||||
var isAuthenticated = await ref
|
||||
.read(authenticationProvider.notifier)
|
||||
.login(
|
||||
loginInfo!.email, loginInfo.password, loginInfo.serverUrl, true);
|
||||
var isAuthenticated =
|
||||
await ref.read(authenticationProvider.notifier).login(
|
||||
loginInfo!.email,
|
||||
loginInfo.password,
|
||||
loginInfo.serverUrl,
|
||||
true,
|
||||
);
|
||||
|
||||
if (isAuthenticated) {
|
||||
// Resume backup (if enable) then navigate
|
||||
|
|
@ -33,14 +36,17 @@ class SplashScreenPage extends HookConsumerWidget {
|
|||
}
|
||||
}
|
||||
|
||||
useEffect(() {
|
||||
if (loginInfo?.isSaveLogin == true) {
|
||||
performLoggingIn();
|
||||
} else {
|
||||
AutoRouter.of(context).push(const LoginRoute());
|
||||
}
|
||||
return null;
|
||||
}, []);
|
||||
useEffect(
|
||||
() {
|
||||
if (loginInfo?.isSaveLogin == true) {
|
||||
performLoggingIn();
|
||||
} else {
|
||||
AutoRouter.of(context).push(const LoginRoute());
|
||||
}
|
||||
return null;
|
||||
},
|
||||
[],
|
||||
);
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: immichBackgroundColor,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue