mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2026-01-27 13:01:02 +00:00
fix: Reload patches
This commit is contained in:
@@ -95,8 +95,6 @@ class InstallerViewModel extends BaseViewModel {
|
|||||||
isInstalled = false;
|
isInstalled = false;
|
||||||
hasErrors = false;
|
hasErrors = false;
|
||||||
} else if (value == 1.0) {
|
} else if (value == 1.0) {
|
||||||
_managerAPI.patches.clear();
|
|
||||||
|
|
||||||
isPatching = false;
|
isPatching = false;
|
||||||
hasErrors = false;
|
hasErrors = false;
|
||||||
await _managerAPI.savePatches(
|
await _managerAPI.savePatches(
|
||||||
@@ -132,7 +130,6 @@ class InstallerViewModel extends BaseViewModel {
|
|||||||
|
|
||||||
Future<void> runPatcher() async {
|
Future<void> runPatcher() async {
|
||||||
try {
|
try {
|
||||||
update(0.1, '', 'Creating working directory');
|
|
||||||
await _patcherAPI.runPatcher(
|
await _patcherAPI.runPatcher(
|
||||||
_app.packageName,
|
_app.packageName,
|
||||||
_app.apkFilePath,
|
_app.apkFilePath,
|
||||||
@@ -149,6 +146,12 @@ 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();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (FlutterBackground.isBackgroundExecutionEnabled) {
|
if (FlutterBackground.isBackgroundExecutionEnabled) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user