fix(mobile): freeze at splash screen when updating from 1.85 to the new version (#5012)
* fix(mobile): Cannot return to logged in screen due to name changes * fix(mobile): Cannot return to logged in screen due to name changes * remove deadcode * test deprecate * Add deprecated decorator * revert api change
This commit is contained in:
parent
38983838fd
commit
ac7e8bcdf4
2 changed files with 20 additions and 7 deletions
|
@ -169,4 +169,4 @@ SPEC CHECKSUMS:
|
|||
|
||||
PODFILE CHECKSUM: 599d8aeb73728400c15364e734525722250a5382
|
||||
|
||||
COCOAPODS: 1.12.1
|
||||
COCOAPODS: 1.11.3
|
||||
|
|
|
@ -40,12 +40,25 @@ class SplashScreenPage extends HookConsumerWidget {
|
|||
log.severe(e);
|
||||
}
|
||||
|
||||
isSuccess =
|
||||
await ref.read(authenticationProvider.notifier).setSuccessLoginInfo(
|
||||
accessToken: accessToken,
|
||||
serverUrl: serverUrl,
|
||||
offlineLogin: deviceIsOffline,
|
||||
);
|
||||
try {
|
||||
isSuccess = await ref
|
||||
.read(authenticationProvider.notifier)
|
||||
.setSuccessLoginInfo(
|
||||
accessToken: accessToken,
|
||||
serverUrl: serverUrl,
|
||||
offlineLogin: deviceIsOffline,
|
||||
);
|
||||
} catch (error, stackTrace) {
|
||||
ref.read(authenticationProvider.notifier).logout();
|
||||
|
||||
log.severe(
|
||||
'Cannot set success login info: $error',
|
||||
error,
|
||||
stackTrace,
|
||||
);
|
||||
|
||||
context.autoPush(const LoginRoute());
|
||||
}
|
||||
}
|
||||
|
||||
// If the device is offline and there is a currentUser stored locallly
|
||||
|
|
Loading…
Reference in a new issue