diff --git a/assets/i18n/en_US.json b/assets/i18n/en_US.json index e0038f3e..3ad34a50 100644 --- a/assets/i18n/en_US.json +++ b/assets/i18n/en_US.json @@ -278,7 +278,6 @@ "rootDialogText": "App was installed with superuser permissions, but currently ReVanced Manager has no permissions.\nPlease grant superuser permissions first.", "packageNameLabel": "Package name", - "originalPackageNameLabel": "Original package name", "installTypeLabel": "Installation type", "rootTypeLabel": "Root", "nonRootTypeLabel": "Non-root", diff --git a/lib/models/patched_application.dart b/lib/models/patched_application.dart index 8f54dd72..23517595 100644 --- a/lib/models/patched_application.dart +++ b/lib/models/patched_application.dart @@ -9,7 +9,6 @@ class PatchedApplication { PatchedApplication({ required this.name, required this.packageName, - required this.originalPackageName, required this.version, required this.apkFilePath, required this.icon, @@ -23,7 +22,6 @@ class PatchedApplication { _$PatchedApplicationFromJson(json); String name; String packageName; - String originalPackageName; String version; final String apkFilePath; @JsonKey( diff --git a/lib/services/github_api.dart b/lib/services/github_api.dart index 442b3ee6..03eacf8b 100644 --- a/lib/services/github_api.dart +++ b/lib/services/github_api.dart @@ -1,4 +1,3 @@ -import 'dart:convert'; import 'dart:io'; import 'package:collection/collection.dart'; import 'package:dio/dio.dart'; @@ -7,7 +6,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter_cache_manager/flutter_cache_manager.dart'; import 'package:injectable/injectable.dart'; import 'package:revanced_manager/app/app.locator.dart'; -import 'package:revanced_manager/models/patch.dart'; import 'package:revanced_manager/services/manager_api.dart'; @lazySingleton diff --git a/lib/services/manager_api.dart b/lib/services/manager_api.dart index 275efc93..d3eed845 100644 --- a/lib/services/manager_api.dart +++ b/lib/services/manager_api.dart @@ -520,7 +520,6 @@ class ManagerAPI { PatchedApplication( name: application.appName, packageName: application.packageName, - originalPackageName: application.packageName, version: application.versionName!, apkFilePath: application.apkFilePath, icon: application.icon, diff --git a/lib/ui/views/app_selector/app_selector_viewmodel.dart b/lib/ui/views/app_selector/app_selector_viewmodel.dart index e3691bba..bd029133 100644 --- a/lib/ui/views/app_selector/app_selector_viewmodel.dart +++ b/lib/ui/views/app_selector/app_selector_viewmodel.dart @@ -73,7 +73,6 @@ class AppSelectorViewModel extends BaseViewModel { locator().selectedApp = PatchedApplication( name: application.appName, packageName: application.packageName, - originalPackageName: application.packageName, version: application.versionName!, apkFilePath: application.apkFilePath, icon: application.icon, @@ -202,7 +201,6 @@ class AppSelectorViewModel extends BaseViewModel { locator().selectedApp = PatchedApplication( name: application.appName, packageName: application.packageName, - originalPackageName: application.packageName, version: application.versionName!, apkFilePath: result.files.single.path!, icon: application.icon, diff --git a/lib/ui/views/patcher/patcher_viewmodel.dart b/lib/ui/views/patcher/patcher_viewmodel.dart index bd0bc41b..e0cadb4a 100644 --- a/lib/ui/views/patcher/patcher_viewmodel.dart +++ b/lib/ui/views/patcher/patcher_viewmodel.dart @@ -142,9 +142,9 @@ class PatcherViewModel extends BaseViewModel { this.selectedPatches.clear(); removedPatches.clear(); final List selectedPatches = - await _managerAPI.getSelectedPatches(selectedApp!.originalPackageName); + await _managerAPI.getSelectedPatches(selectedApp!.packageName); final List patches = - _patcherAPI.getFilteredPatches(selectedApp!.originalPackageName); + _patcherAPI.getFilteredPatches(selectedApp!.packageName); this .selectedPatches .addAll(patches.where((patch) => selectedPatches.contains(patch.name))); @@ -160,7 +160,7 @@ class PatcherViewModel extends BaseViewModel { .selectedPatches .removeWhere((patch) => patch.compatiblePackages.isEmpty); } - final usedPatches = _managerAPI.getUsedPatches(selectedApp!.originalPackageName); + final usedPatches = _managerAPI.getUsedPatches(selectedApp!.packageName); for (final patch in usedPatches){ if (!patches.any((p) => p.name == patch.name)){ removedPatches.add('\u2022 ${patch.name}'); diff --git a/lib/ui/views/patches_selector/patches_selector_viewmodel.dart b/lib/ui/views/patches_selector/patches_selector_viewmodel.dart index 71e4a16e..ea48c0da 100644 --- a/lib/ui/views/patches_selector/patches_selector_viewmodel.dart +++ b/lib/ui/views/patches_selector/patches_selector_viewmodel.dart @@ -28,7 +28,7 @@ class PatchesSelectorViewModel extends BaseViewModel { getPatchesVersion().whenComplete(() => notifyListeners()); patches.addAll( _patcherAPI.getFilteredPatches( - selectedApp!.originalPackageName, + selectedApp!.packageName, ), ); patches.sort((a, b) { @@ -98,11 +98,11 @@ class PatchesSelectorViewModel extends BaseViewModel { void selectDefaultPatches() { selectedPatches.clear(); - if (locator().selectedApp?.originalPackageName != null) { + if (locator().selectedApp?.packageName != null) { selectedPatches.addAll( _patcherAPI .getFilteredPatches( - locator().selectedApp!.originalPackageName, + locator().selectedApp!.packageName, ) .where( (element) => @@ -187,7 +187,7 @@ class PatchesSelectorViewModel extends BaseViewModel { final List selectedPatches = this.selectedPatches.map((patch) => patch.name).toList(); await _managerAPI.setSelectedPatches( - locator().selectedApp!.originalPackageName, + locator().selectedApp!.packageName, selectedPatches, ); } @@ -195,7 +195,7 @@ class PatchesSelectorViewModel extends BaseViewModel { Future loadSelectedPatches(BuildContext context) async { if (_managerAPI.isPatchesChangeEnabled()) { final List selectedPatches = await _managerAPI.getSelectedPatches( - locator().selectedApp!.originalPackageName, + locator().selectedApp!.packageName, ); if (selectedPatches.isNotEmpty) { this.selectedPatches.clear(); diff --git a/lib/ui/widgets/appInfoView/app_info_view.dart b/lib/ui/widgets/appInfoView/app_info_view.dart index 2d0f17e1..283beb12 100644 --- a/lib/ui/widgets/appInfoView/app_info_view.dart +++ b/lib/ui/widgets/appInfoView/app_info_view.dart @@ -222,22 +222,6 @@ class AppInfoView extends StatelessWidget { subtitle: Text(app.packageName), ), const SizedBox(height: 4), - ListTile( - contentPadding: - const EdgeInsets.symmetric(horizontal: 20.0), - title: I18nText( - 'appInfoView.originalPackageNameLabel', - child: const Text( - '', - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.w500, - ), - ), - ), - subtitle: Text(app.originalPackageName), - ), - const SizedBox(height: 4), ListTile( contentPadding: const EdgeInsets.symmetric(horizontal: 20.0), diff --git a/lib/ui/widgets/appInfoView/app_info_viewmodel.dart b/lib/ui/widgets/appInfoView/app_info_viewmodel.dart index 69b3f68b..bc24a558 100644 --- a/lib/ui/widgets/appInfoView/app_info_viewmodel.dart +++ b/lib/ui/widgets/appInfoView/app_info_viewmodel.dart @@ -13,7 +13,6 @@ import 'package:revanced_manager/ui/views/home/home_viewmodel.dart'; import 'package:revanced_manager/ui/views/navigation/navigation_viewmodel.dart'; import 'package:revanced_manager/ui/views/patcher/patcher_viewmodel.dart'; import 'package:revanced_manager/ui/widgets/shared/custom_material_button.dart'; -import 'package:revanced_manager/utils/string.dart'; import 'package:stacked/stacked.dart'; class AppInfoViewModel extends BaseViewModel {