mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 07:48:40 +00:00
do not load data from server until appVersion is valid
This commit is contained in:
parent
d59b8602f9
commit
0a1732523b
2 changed files with 7 additions and 1 deletions
|
|
@ -41,7 +41,7 @@ void main() async {
|
|||
await settingsController.loadSettings();
|
||||
await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
|
||||
// unawaited(setupPushNotification());
|
||||
unawaited(setupPushNotification());
|
||||
|
||||
gCameras = await availableCameras();
|
||||
|
||||
|
|
|
|||
|
|
@ -367,6 +367,12 @@ class ApiService {
|
|||
final user = await getUser();
|
||||
|
||||
if (apiAuthToken != null && user != null) {
|
||||
if (user.appVersion < 62) {
|
||||
Log.error(
|
||||
'DID NOT authenticate the user, as he still has the old version!',
|
||||
);
|
||||
return false;
|
||||
}
|
||||
final authenticate = Handshake_Authenticate()
|
||||
..userId = Int64(userId)
|
||||
..appVersion = (await PackageInfo.fromPlatform()).version
|
||||
|
|
|
|||
Loading…
Reference in a new issue