mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-10 01:01:56 +01:00
fix: Don't crash when installing the last patched APK (#2131)
This commit is contained in:
parent
0499d2b08a
commit
cb722f2634
2 changed files with 52 additions and 49 deletions
100
lib/app/app.dart
100
lib/app/app.dart
|
@ -1,49 +1,51 @@
|
||||||
import 'package:revanced_manager/services/download_manager.dart';
|
import 'package:revanced_manager/services/download_manager.dart';
|
||||||
import 'package:revanced_manager/services/github_api.dart';
|
import 'package:revanced_manager/services/github_api.dart';
|
||||||
import 'package:revanced_manager/services/manager_api.dart';
|
import 'package:revanced_manager/services/manager_api.dart';
|
||||||
import 'package:revanced_manager/services/patcher_api.dart';
|
import 'package:revanced_manager/services/patcher_api.dart';
|
||||||
import 'package:revanced_manager/services/revanced_api.dart';
|
import 'package:revanced_manager/services/revanced_api.dart';
|
||||||
import 'package:revanced_manager/services/toast.dart';
|
import 'package:revanced_manager/services/toast.dart';
|
||||||
import 'package:revanced_manager/ui/views/app_selector/app_selector_view.dart';
|
import 'package:revanced_manager/ui/views/app_selector/app_selector_view.dart';
|
||||||
import 'package:revanced_manager/ui/views/contributors/contributors_view.dart';
|
import 'package:revanced_manager/ui/views/contributors/contributors_view.dart';
|
||||||
import 'package:revanced_manager/ui/views/home/home_viewmodel.dart';
|
import 'package:revanced_manager/ui/views/home/home_viewmodel.dart';
|
||||||
import 'package:revanced_manager/ui/views/installer/installer_view.dart';
|
import 'package:revanced_manager/ui/views/installer/installer_view.dart';
|
||||||
import 'package:revanced_manager/ui/views/navigation/navigation_view.dart';
|
import 'package:revanced_manager/ui/views/installer/installer_viewmodel.dart';
|
||||||
import 'package:revanced_manager/ui/views/navigation/navigation_viewmodel.dart';
|
import 'package:revanced_manager/ui/views/navigation/navigation_view.dart';
|
||||||
import 'package:revanced_manager/ui/views/patch_options/patch_options_view.dart';
|
import 'package:revanced_manager/ui/views/navigation/navigation_viewmodel.dart';
|
||||||
import 'package:revanced_manager/ui/views/patch_options/patch_options_viewmodel.dart';
|
import 'package:revanced_manager/ui/views/patch_options/patch_options_view.dart';
|
||||||
import 'package:revanced_manager/ui/views/patcher/patcher_view.dart';
|
import 'package:revanced_manager/ui/views/patch_options/patch_options_viewmodel.dart';
|
||||||
import 'package:revanced_manager/ui/views/patcher/patcher_viewmodel.dart';
|
import 'package:revanced_manager/ui/views/patcher/patcher_view.dart';
|
||||||
import 'package:revanced_manager/ui/views/patches_selector/patches_selector_view.dart';
|
import 'package:revanced_manager/ui/views/patcher/patcher_viewmodel.dart';
|
||||||
import 'package:revanced_manager/ui/views/settings/settings_view.dart';
|
import 'package:revanced_manager/ui/views/patches_selector/patches_selector_view.dart';
|
||||||
import 'package:revanced_manager/ui/widgets/appInfoView/app_info_view.dart';
|
import 'package:revanced_manager/ui/views/settings/settings_view.dart';
|
||||||
import 'package:stacked/stacked_annotations.dart';
|
import 'package:revanced_manager/ui/widgets/appInfoView/app_info_view.dart';
|
||||||
import 'package:stacked_services/stacked_services.dart';
|
import 'package:stacked/stacked_annotations.dart';
|
||||||
|
import 'package:stacked_services/stacked_services.dart';
|
||||||
@StackedApp(
|
|
||||||
routes: [
|
@StackedApp(
|
||||||
MaterialRoute(page: NavigationView),
|
routes: [
|
||||||
MaterialRoute(page: PatcherView),
|
MaterialRoute(page: NavigationView),
|
||||||
MaterialRoute(page: AppSelectorView),
|
MaterialRoute(page: PatcherView),
|
||||||
MaterialRoute(page: PatchesSelectorView),
|
MaterialRoute(page: AppSelectorView),
|
||||||
MaterialRoute(page: PatchOptionsView),
|
MaterialRoute(page: PatchesSelectorView),
|
||||||
MaterialRoute(page: InstallerView),
|
MaterialRoute(page: PatchOptionsView),
|
||||||
MaterialRoute(page: SettingsView),
|
MaterialRoute(page: InstallerView),
|
||||||
MaterialRoute(page: ContributorsView),
|
MaterialRoute(page: SettingsView),
|
||||||
MaterialRoute(page: AppInfoView),
|
MaterialRoute(page: ContributorsView),
|
||||||
],
|
MaterialRoute(page: AppInfoView),
|
||||||
dependencies: [
|
],
|
||||||
LazySingleton(classType: NavigationViewModel),
|
dependencies: [
|
||||||
LazySingleton(classType: HomeViewModel),
|
LazySingleton(classType: NavigationViewModel),
|
||||||
LazySingleton(classType: PatcherViewModel),
|
LazySingleton(classType: HomeViewModel),
|
||||||
LazySingleton(classType: PatchOptionsViewModel),
|
LazySingleton(classType: PatcherViewModel),
|
||||||
LazySingleton(classType: NavigationService),
|
LazySingleton(classType: PatchOptionsViewModel),
|
||||||
LazySingleton(classType: ManagerAPI),
|
LazySingleton(classType: InstallerViewModel),
|
||||||
LazySingleton(classType: PatcherAPI),
|
LazySingleton(classType: NavigationService),
|
||||||
LazySingleton(classType: RevancedAPI),
|
LazySingleton(classType: ManagerAPI),
|
||||||
LazySingleton(classType: GithubAPI),
|
LazySingleton(classType: PatcherAPI),
|
||||||
LazySingleton(classType: DownloadManager),
|
LazySingleton(classType: RevancedAPI),
|
||||||
LazySingleton(classType: Toast),
|
LazySingleton(classType: GithubAPI),
|
||||||
],
|
LazySingleton(classType: DownloadManager),
|
||||||
)
|
LazySingleton(classType: Toast),
|
||||||
class AppSetup {}
|
],
|
||||||
|
)
|
||||||
|
class AppSetup {}
|
||||||
|
|
|
@ -27,6 +27,7 @@ class AppInfoViewModel extends BaseViewModel {
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
PatchedApplication app,
|
PatchedApplication app,
|
||||||
) async {
|
) async {
|
||||||
|
locator<PatcherViewModel>().selectedApp = app;
|
||||||
locator<InstallerViewModel>().installTypeDialog(context);
|
locator<InstallerViewModel>().installTypeDialog(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue