do not load data from server until appVersion is valid

This commit is contained in:
otsmr 2025-11-08 14:30:20 +01:00
parent d59b8602f9
commit 0a1732523b
2 changed files with 7 additions and 1 deletions

View file

@ -41,7 +41,7 @@ void main() async {
await settingsController.loadSettings();
await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
// unawaited(setupPushNotification());
unawaited(setupPushNotification());
gCameras = await availableCameras();

View file

@ -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