mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-06-12 20:57:36 +02:00
fix: unblock UI while running Patcher (#4)
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
import 'package:revanced_manager/app/app.locator.dart';
|
||||
import 'package:revanced_manager/app/app.router.dart';
|
||||
import 'package:revanced_manager/ui/views/app_selector/app_selector_viewmodel.dart';
|
||||
import 'package:revanced_manager/ui/views/patches_selector/patches_selector_viewmodel.dart';
|
||||
import 'package:stacked/stacked.dart';
|
||||
import 'package:stacked_services/stacked_services.dart';
|
||||
|
||||
class PatcherViewModel extends BaseViewModel {
|
||||
final _navigationService = locator<NavigationService>();
|
||||
bool dimPatchCard = true;
|
||||
bool showFabButton = false;
|
||||
|
||||
void navigateToAppSelector() {
|
||||
_navigationService.navigateTo(Routes.appSelectorView);
|
||||
@ -19,4 +19,12 @@ class PatcherViewModel extends BaseViewModel {
|
||||
void navigateToInstaller() {
|
||||
_navigationService.navigateTo(Routes.installerView);
|
||||
}
|
||||
|
||||
bool showFabButton() {
|
||||
return locator<PatchesSelectorViewModel>().selectedPatches.isNotEmpty;
|
||||
}
|
||||
|
||||
bool dimPatchesCard() {
|
||||
return locator<AppSelectorViewModel>().selectedApp == null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user