mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-05-08 17:34: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,
|
PatchedApplication app,
|
||||||
File outFile,
|
File outFile,
|
||||||
) async {
|
) async {
|
||||||
deleteLastPatchedApp();
|
|
||||||
final Directory appCache = await getApplicationSupportDirectory();
|
final Directory appCache = await getApplicationSupportDirectory();
|
||||||
app.patchedFilePath =
|
app.patchedFilePath =
|
||||||
outFile.copySync('${appCache.path}/lastPatchedApp.apk').path;
|
outFile.copySync('${appCache.path}/lastPatchedApp.apk').path;
|
||||||
@ -691,16 +690,6 @@ class ManagerAPI {
|
|||||||
patchedApps.addAll(mountedApps);
|
patchedApps.addAll(mountedApps);
|
||||||
|
|
||||||
await setPatchedApps(patchedApps);
|
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 {
|
Future<bool> isAppUninstalled(PatchedApplication app) async {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user