diff --git a/lib/ui/views/installer/installer_viewmodel.dart b/lib/ui/views/installer/installer_viewmodel.dart index c9e5ab28..708c3ff4 100644 --- a/lib/ui/views/installer/installer_viewmodel.dart +++ b/lib/ui/views/installer/installer_viewmodel.dart @@ -62,7 +62,7 @@ class InstallerViewModel extends BaseViewModel { locator().selectedPatches; if (selectedPatches.isNotEmpty) { addLog('Initializing installer...'); - if (selectedApp.isRooted) { + if (selectedApp.isRooted && !selectedApp.isFromStorage) { addLog('Checking if an old patched version exists...'); bool oldExists = await locator().checkOldPatch(selectedApp); diff --git a/lib/ui/widgets/app_selector_card.dart b/lib/ui/widgets/app_selector_card.dart index 990676d9..a4f57020 100644 --- a/lib/ui/widgets/app_selector_card.dart +++ b/lib/ui/widgets/app_selector_card.dart @@ -45,7 +45,7 @@ class AppSelectorCard extends StatelessWidget { const SizedBox(height: 10), locator().selectedApp != null ? Text( - locator().selectedApp!.name, + _getAppSelection(), style: robotoTextStyle, ) : I18nText( @@ -60,4 +60,10 @@ class AppSelectorCard extends StatelessWidget { ), ); } + + String _getAppSelection() { + String name = locator().selectedApp!.name; + String version = locator().selectedApp!.version; + return '$name (v$version)'; + } } diff --git a/lib/ui/widgets/patch_selector_card.dart b/lib/ui/widgets/patch_selector_card.dart index 98eb0635..0c9fee98 100644 --- a/lib/ui/widgets/patch_selector_card.dart +++ b/lib/ui/widgets/patch_selector_card.dart @@ -3,6 +3,7 @@ import 'package:flutter_i18n/flutter_i18n.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:revanced_manager/app/app.locator.dart'; import 'package:revanced_manager/constants.dart'; +import 'package:revanced_manager/models/patch.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'; @@ -58,15 +59,20 @@ class PatchSelectorCard extends StatelessWidget { ), ) : Text( - locator() - .selectedPatches - .map((e) => e.simpleName) - .toList() - .join('\n'), + _getPatchesSelection(), + style: robotoTextStyle, ), ], ), ), ); } + + String _getPatchesSelection() { + String text = ''; + for (Patch p in locator().selectedPatches) { + text += '${p.simpleName} (v${p.version})\n'; + } + return text.substring(0, text.length - 1); + } }