diff --git a/lib/services/patcher_api.dart b/lib/services/patcher_api.dart index f6c8aa3e..dc4ffabd 100644 --- a/lib/services/patcher_api.dart +++ b/lib/services/patcher_api.dart @@ -31,7 +31,7 @@ class PatcherAPI { File? outFile; Future initialize() async { - await _loadPatches(); + await loadPatches(); await _managerAPI.downloadIntegrations(); final Directory appCache = await getTemporaryDirectory(); _dataDir = await getExternalStorageDirectory() ?? appCache; @@ -62,7 +62,7 @@ class PatcherAPI { return _patches.where((patch) => patch.compatiblePackages.isEmpty).toList(); } - Future _loadPatches() async { + Future loadPatches() async { try { if (_patches.isEmpty) { _patches = await _managerAPI.getPatches(); diff --git a/lib/ui/views/installer/installer_viewmodel.dart b/lib/ui/views/installer/installer_viewmodel.dart index 3bfa5d24..8d54987d 100644 --- a/lib/ui/views/installer/installer_viewmodel.dart +++ b/lib/ui/views/installer/installer_viewmodel.dart @@ -148,9 +148,8 @@ 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(); + await _patcherAPI.loadPatches(); try { if (FlutterBackground.isBackgroundExecutionEnabled) {