diff --git a/lib/services/manager_api.dart b/lib/services/manager_api.dart index a1edc3a319..8851858724 100644 --- a/lib/services/manager_api.dart +++ b/lib/services/manager_api.dart @@ -669,7 +669,7 @@ class ManagerAPI { ); } - Future rePatchedSavedApps() async { + Future reAssessPatchedApps() async { final List patchedApps = getPatchedApps(); // Remove apps that are not installed anymore. diff --git a/lib/ui/views/home/home_viewmodel.dart b/lib/ui/views/home/home_viewmodel.dart index 0debb4643b..3c3c028974 100644 --- a/lib/ui/views/home/home_viewmodel.dart +++ b/lib/ui/views/home/home_viewmodel.dart @@ -43,7 +43,7 @@ class HomeViewModel extends BaseViewModel { File? downloadedApk; Future initialize(BuildContext context) async { - _managerAPI.rePatchedSavedApps().then((_) => _getPatchedApps()); + _managerAPI.reAssessPatchedApps().then((_) => getPatchedApps()); _currentManagerVersion = await _managerAPI.getCurrentManagerVersion(); if (!_managerAPI.getDownloadConsent()) { await showDownloadConsent(context); @@ -122,7 +122,7 @@ class HomeViewModel extends BaseViewModel { locator().setIndex(1); } - void _getPatchedApps() { + void getPatchedApps() { patchedInstalledApps = _managerAPI.getPatchedApps().toList(); notifyListeners(); } diff --git a/lib/ui/views/installer/installer_viewmodel.dart b/lib/ui/views/installer/installer_viewmodel.dart index d2a8c7f50a..0602eec7f0 100644 --- a/lib/ui/views/installer/installer_viewmodel.dart +++ b/lib/ui/views/installer/installer_viewmodel.dart @@ -465,7 +465,10 @@ class InstallerViewModel extends BaseViewModel { } await _managerAPI.savePatchedApp(_app); - await locator().initialize(context); + + _managerAPI + .reAssessPatchedApps() + .then((_) => locator().getPatchedApps()); update(1.0, 'Installed', 'Installed'); } else if (response == 3) {