feat: use provided patches.json to load patches

This commit is contained in:
Alberto Ponces
2022-08-29 17:44:45 +01:00
parent 080ceae784
commit 03b45e0db0
11 changed files with 210 additions and 338 deletions

View File

@ -27,7 +27,6 @@ class HomeViewModel extends BaseViewModel {
Future<void> initialize() async {
await _getPatchedApps();
await _patcherAPI.loadPatches();
await flutterLocalNotificationsPlugin.initialize(
const InitializationSettings(
android: AndroidInitializationSettings('ic_notification'),
@ -45,7 +44,7 @@ class HomeViewModel extends BaseViewModel {
void navigateToPatcher(PatchedApplication app) async {
locator<PatcherViewModel>().selectedApp = app;
locator<PatcherViewModel>().selectedPatches =
await _patcherAPI.getAppliedPatches(app);
await _patcherAPI.getAppliedPatches(app.appliedPatches);
locator<PatcherViewModel>().notifyListeners();
locator<MainViewModel>().setIndex(1);
}