mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 09:28:41 +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 settingsController.loadSettings();
|
||||||
await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||||
|
|
||||||
// unawaited(setupPushNotification());
|
unawaited(setupPushNotification());
|
||||||
|
|
||||||
gCameras = await availableCameras();
|
gCameras = await availableCameras();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -367,6 +367,12 @@ class ApiService {
|
||||||
final user = await getUser();
|
final user = await getUser();
|
||||||
|
|
||||||
if (apiAuthToken != null && user != null) {
|
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()
|
final authenticate = Handshake_Authenticate()
|
||||||
..userId = Int64(userId)
|
..userId = Int64(userId)
|
||||||
..appVersion = (await PackageInfo.fromPlatform()).version
|
..appVersion = (await PackageInfo.fromPlatform()).version
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue