chore: failed to fetch version error message

This commit is contained in:
bwees 2025-10-16 14:34:44 -05:00
parent 9f928af0d7
commit 261f6578d3
No known key found for this signature in database
4 changed files with 30 additions and 11 deletions

View file

@ -28,6 +28,7 @@ class ServerInfoNotifier extends StateNotifier<ServerInfo> {
isServerOutOfDate: false,
isNewReleaseAvailable: false,
versionMismatchErrorMessage: "",
errorGettingVersions: false,
),
);
@ -46,14 +47,20 @@ class ServerInfoNotifier extends StateNotifier<ServerInfo> {
// using isClientOutOfDate since that will show to users reguardless of if they are an admin
if (serverVersion == null) {
state = state.copyWith(isClientOutOfDate: true, versionMismatchErrorMessage: "common_server_error".tr());
state = state.copyWith(
errorGettingVersions: true,
versionMismatchErrorMessage: "profile_drawer_unable_to_check_version".tr(),
);
return;
}
await _checkServerVersionMismatch(serverVersion);
} catch (e, stackTrace) {
_log.severe("Failed to get server version", e, stackTrace);
state = state.copyWith(isClientOutOfDate: true);
state = state.copyWith(
errorGettingVersions: true,
versionMismatchErrorMessage: "profile_drawer_unable_to_check_version".tr(),
);
return;
}
}