Skip to content

Commit

Permalink
fix: Fix white-screen when trying to install conflicting apps
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
oSumAtrIX committed Mar 9, 2024
1 parent 982249f commit 4acd738
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions lib/services/patcher_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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)
Expand Down

0 comments on commit 4acd738

Please sign in to comment.