fix: Fix white-screen when trying to install conflicting apps

When you tried to install a patched app, but it conflicted with an existing installation, the screen would go blank. This was caused by trying to use an argument on a translation with no arguments.
This commit is contained in:
oSumAtrIX 2024-03-07 23:42:41 +01:00
parent 982249f974
commit 4acd738353
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -297,6 +297,18 @@ class PatcherAPI {
);
bool cleanInstall = false;
final bool isFixable = statusCode == 4 || statusCode == 5;
var description = t['installErrorDialog.${statusValue}_description'];
if (statusCode == 2) {
description = description(
packageName: statusCode == 2
? {
'packageName': status['otherPackageName'],
}
: null,
);
}
await showDialog(
context: _managerAPI.ctx!,
builder: (context) => AlertDialog(
@ -306,15 +318,7 @@ class PatcherAPI {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Text(
t['installErrorDialog.${statusValue}_description'](
packageName: statusCode == 2
? {
'packageName': status['otherPackageName'],
}
: null,
),
),
Text(description),
],
),
actions: (status == null)