added version numbers to update dialog (#1244)
This commit is contained in:
parent
966ab19ae0
commit
3cf1140039
2 changed files with 21 additions and 5 deletions
|
|
@ -4628,5 +4628,7 @@
|
|||
"enableTTSToolName": "Enabled text-to-speech",
|
||||
"enableTTSToolDescription": "Allow the app to generate text-to-speech output for portions of text in your target language",
|
||||
"couldNotFindTTS": "We couldn't find a text-to-speech engine for your current target language. ",
|
||||
"ttsInstructionsHyperlink": "Click here to view instructions for downloading a new voice on your device."
|
||||
"ttsInstructionsHyperlink": "Click here to view instructions for downloading a new voice on your device.",
|
||||
"currentVersion": "Current Version",
|
||||
"latestVersion": "Latest Version"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,8 +128,14 @@ class AppVersionController {
|
|||
return;
|
||||
}
|
||||
|
||||
final OkCancelResult dialogResponse =
|
||||
await _showDialog(context, mandatoryUpdate);
|
||||
final OkCancelResult dialogResponse = await _showDialog(
|
||||
context,
|
||||
mandatoryUpdate,
|
||||
currentVersion,
|
||||
remoteVersion,
|
||||
currentBuildNumber,
|
||||
remoteBuildNumber,
|
||||
);
|
||||
|
||||
if (!mandatoryUpdate && dialogResponse != OkCancelResult.ok) {
|
||||
await MatrixState.pangeaController.pStoreService.save(
|
||||
|
|
@ -146,13 +152,21 @@ class AppVersionController {
|
|||
static Future<OkCancelResult> _showDialog(
|
||||
BuildContext context,
|
||||
bool mandatoryUpdate,
|
||||
String currentVersion,
|
||||
String remoteVersion,
|
||||
String currentBuildNumber,
|
||||
String remoteBuildNumber,
|
||||
) async {
|
||||
final title = mandatoryUpdate
|
||||
? L10n.of(context).mandatoryUpdateRequired
|
||||
: L10n.of(context).updateAvailable;
|
||||
final message = mandatoryUpdate
|
||||
? L10n.of(context).mandatoryUpdateRequiredDesc
|
||||
: L10n.of(context).updateAvailableDesc;
|
||||
? "${L10n.of(context).mandatoryUpdateRequiredDesc}\n\n"
|
||||
"${L10n.of(context).currentVersion}: $currentVersion+$currentBuildNumber\n"
|
||||
"${L10n.of(context).latestVersion}: $remoteVersion+$remoteBuildNumber"
|
||||
: "${L10n.of(context).updateAvailableDesc}\n\n"
|
||||
"${L10n.of(context).currentVersion}: $currentVersion+$currentBuildNumber\n"
|
||||
"${L10n.of(context).latestVersion}: $remoteVersion+$remoteBuildNumber";
|
||||
return mandatoryUpdate
|
||||
? showOkAlertDialog(
|
||||
context: context,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue