Skip to content

Commit

Permalink
fix: Reload patches
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Oct 4, 2023
1 parent d8eadc2 commit b07439d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/ui/views/installer/installer_viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ class InstallerViewModel extends BaseViewModel {
isInstalled = false;
hasErrors = false;
} else if (value == 1.0) {
_managerAPI.patches.clear();

isPatching = false;
hasErrors = false;
await _managerAPI.savePatches(
Expand Down Expand Up @@ -132,7 +130,6 @@ class InstallerViewModel extends BaseViewModel {

Future<void> runPatcher() async {
try {
update(0.1, '', 'Creating working directory');
await _patcherAPI.runPatcher(
_app.packageName,
_app.apkFilePath,
Expand All @@ -149,6 +146,12 @@ class InstallerViewModel extends BaseViewModel {
}
}

// Necessary to reset the state of patches by reloading them
// in a later patching process.
// TODO(Benjamin): Fix this not working
_managerAPI.patches.clear();
await _managerAPI.getPatches();

try {
if (FlutterBackground.isBackgroundExecutionEnabled) {
try {
Expand Down

0 comments on commit b07439d

Please sign in to comment.