mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-13 02:14:31 +01:00
fix: Fix patched APKs exports after installation
This commit is contained in:
parent
02722fc0be
commit
1200360588
3 changed files with 7 additions and 4 deletions
|
@ -669,7 +669,7 @@ class ManagerAPI {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> rePatchedSavedApps() async {
|
Future<void> reAssessPatchedApps() async {
|
||||||
final List<PatchedApplication> patchedApps = getPatchedApps();
|
final List<PatchedApplication> patchedApps = getPatchedApps();
|
||||||
|
|
||||||
// Remove apps that are not installed anymore.
|
// Remove apps that are not installed anymore.
|
||||||
|
|
|
@ -43,7 +43,7 @@ class HomeViewModel extends BaseViewModel {
|
||||||
File? downloadedApk;
|
File? downloadedApk;
|
||||||
|
|
||||||
Future<void> initialize(BuildContext context) async {
|
Future<void> initialize(BuildContext context) async {
|
||||||
_managerAPI.rePatchedSavedApps().then((_) => _getPatchedApps());
|
_managerAPI.reAssessPatchedApps().then((_) => getPatchedApps());
|
||||||
_currentManagerVersion = await _managerAPI.getCurrentManagerVersion();
|
_currentManagerVersion = await _managerAPI.getCurrentManagerVersion();
|
||||||
if (!_managerAPI.getDownloadConsent()) {
|
if (!_managerAPI.getDownloadConsent()) {
|
||||||
await showDownloadConsent(context);
|
await showDownloadConsent(context);
|
||||||
|
@ -122,7 +122,7 @@ class HomeViewModel extends BaseViewModel {
|
||||||
locator<NavigationViewModel>().setIndex(1);
|
locator<NavigationViewModel>().setIndex(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _getPatchedApps() {
|
void getPatchedApps() {
|
||||||
patchedInstalledApps = _managerAPI.getPatchedApps().toList();
|
patchedInstalledApps = _managerAPI.getPatchedApps().toList();
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
|
@ -465,7 +465,10 @@ class InstallerViewModel extends BaseViewModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
await _managerAPI.savePatchedApp(_app);
|
await _managerAPI.savePatchedApp(_app);
|
||||||
await locator<HomeViewModel>().initialize(context);
|
|
||||||
|
_managerAPI
|
||||||
|
.reAssessPatchedApps()
|
||||||
|
.then((_) => locator<HomeViewModel>().getPatchedApps());
|
||||||
|
|
||||||
update(1.0, 'Installed', 'Installed');
|
update(1.0, 'Installed', 'Installed');
|
||||||
} else if (response == 3) {
|
} else if (response == 3) {
|
||||||
|
|
Loading…
Reference in a new issue