mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-05-07 17:04:25 +02:00
fix: Fix installation being cancelled at installation by not prematurely deleting patched APK (#2490)
This commit is contained in:
parent
3074766ff2
commit
dedcb3c51a
@ -366,7 +366,6 @@ class ManagerAPI {
|
||||
PatchedApplication app,
|
||||
File outFile,
|
||||
) async {
|
||||
deleteLastPatchedApp();
|
||||
final Directory appCache = await getApplicationSupportDirectory();
|
||||
app.patchedFilePath =
|
||||
outFile.copySync('${appCache.path}/lastPatchedApp.apk').path;
|
||||
@ -691,16 +690,6 @@ class ManagerAPI {
|
||||
patchedApps.addAll(mountedApps);
|
||||
|
||||
await setPatchedApps(patchedApps);
|
||||
|
||||
// Delete the saved app if the file is not found.
|
||||
final PatchedApplication? lastPatchedApp = getLastPatchedApp();
|
||||
if (lastPatchedApp != null) {
|
||||
final File file = File(lastPatchedApp.patchedFilePath);
|
||||
if (!file.existsSync()) {
|
||||
deleteLastPatchedApp();
|
||||
_prefs.remove('lastPatchedApp');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Future<bool> isAppUninstalled(PatchedApplication app) async {
|
||||
|
Loading…
x
Reference in New Issue
Block a user