mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
feat(mobile): compatibility message warning (#10065)
* feat(mobile): compatibility message warning * refactor and better signature
This commit is contained in:
parent
19e35d8d3f
commit
46df165ef2
10 changed files with 350 additions and 217 deletions
17
mobile/lib/utils/version_compatibility.dart
Normal file
17
mobile/lib/utils/version_compatibility.dart
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
String? getVersionCompatibilityMessage(
|
||||
int appMajor,
|
||||
int appMinor,
|
||||
int serverMajor,
|
||||
int serverMinor,
|
||||
) {
|
||||
if (serverMajor != appMajor) {
|
||||
return 'Your app major version is not compatible with the server!';
|
||||
}
|
||||
|
||||
// Add latest compat info up top
|
||||
if (serverMinor < 106 && appMinor >= 106) {
|
||||
return 'Your app minor version is not compatible with the server! Please update your server to version v1.106.0 or newer to login';
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue