mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-06-12 12:47:37 +02:00
refactor: update deprecated and minor code refactors (#710)
Improve code readability & additional refactoring Commits: chore: exclude generated from analyzer refactor: add SharedPreferences to locator refactor: access shared pref from locator, and code refactor refactor: remove unwanted `await` refactor: remove `const` from `CacheConfig`
This commit is contained in:

committed by
EvadeMaster

parent
3ae4d69110
commit
6829d3cdea
@ -57,7 +57,7 @@ class InstallerViewModel extends BaseViewModel {
|
||||
),
|
||||
).then((value) => FlutterBackground.enableBackgroundExecution());
|
||||
} on Exception catch (e, s) {
|
||||
await Sentry.captureException(e, stackTrace: s);
|
||||
Sentry.captureException(e, stackTrace: s).ignore();
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
@ -131,14 +131,13 @@ class InstallerViewModel extends BaseViewModel {
|
||||
_app.apkFilePath,
|
||||
_patches,
|
||||
);
|
||||
} on Exception catch (e, s) {
|
||||
} on Exception catch (e) {
|
||||
update(
|
||||
-100.0,
|
||||
'Aborting...',
|
||||
'An error occurred! Aborting\nError:\n$e',
|
||||
);
|
||||
await Sentry.captureException(e, stackTrace: s);
|
||||
throw await Sentry.captureException(e, stackTrace: s);
|
||||
rethrow;
|
||||
}
|
||||
} else {
|
||||
update(-100.0, 'Aborting...', 'No app or patches selected! Aborting');
|
||||
@ -146,14 +145,13 @@ class InstallerViewModel extends BaseViewModel {
|
||||
if (FlutterBackground.isBackgroundExecutionEnabled) {
|
||||
try {
|
||||
FlutterBackground.disableBackgroundExecution();
|
||||
} on Exception catch (e, s) {
|
||||
await Sentry.captureException(e, stackTrace: s);
|
||||
// ignore
|
||||
} on Exception {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
await Wakelock.disable();
|
||||
} on Exception catch (e, s) {
|
||||
await Sentry.captureException(e, stackTrace: s);
|
||||
Sentry.captureException(e, stackTrace: s).ignore();
|
||||
}
|
||||
}
|
||||
|
||||
@ -212,7 +210,7 @@ class InstallerViewModel extends BaseViewModel {
|
||||
}
|
||||
}
|
||||
} on Exception catch (e, s) {
|
||||
await Sentry.captureException(e, stackTrace: s);
|
||||
Sentry.captureException(e, stackTrace: s).ignore();
|
||||
}
|
||||
}
|
||||
|
||||
@ -220,7 +218,7 @@ class InstallerViewModel extends BaseViewModel {
|
||||
try {
|
||||
_patcherAPI.exportPatchedFile(_app.name, _app.version);
|
||||
} on Exception catch (e, s) {
|
||||
Sentry.captureException(e, stackTrace: s);
|
||||
Sentry.captureException(e, stackTrace: s).ignore();
|
||||
}
|
||||
}
|
||||
|
||||
@ -228,7 +226,7 @@ class InstallerViewModel extends BaseViewModel {
|
||||
try {
|
||||
_patcherAPI.sharePatchedFile(_app.name, _app.version);
|
||||
} on Exception catch (e, s) {
|
||||
Sentry.captureException(e, stackTrace: s);
|
||||
Sentry.captureException(e, stackTrace: s).ignore();
|
||||
}
|
||||
}
|
||||
|
||||
@ -243,7 +241,7 @@ class InstallerViewModel extends BaseViewModel {
|
||||
locator<PatcherViewModel>().selectedPatches.clear();
|
||||
locator<PatcherViewModel>().notifyListeners();
|
||||
} on Exception catch (e, s) {
|
||||
await Sentry.captureException(e, stackTrace: s);
|
||||
Sentry.captureException(e, stackTrace: s).ignore();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user