mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2026-01-27 21:11:01 +00:00
feat: add App Info View
This commit is contained in:
@@ -102,12 +102,18 @@ class ManagerAPI {
|
||||
await setPatchedApps(patchedApps);
|
||||
}
|
||||
|
||||
Future<void> deletePatchedApp(PatchedApplication app) async {
|
||||
List<PatchedApplication> patchedApps = getPatchedApps();
|
||||
patchedApps.removeWhere((a) => a.packageName == app.packageName);
|
||||
await setPatchedApps(patchedApps);
|
||||
}
|
||||
|
||||
Future<void> reAssessSavedApps() async {
|
||||
bool isRoot = isRooted() ?? false;
|
||||
bool isRooted = this.isRooted() ?? false;
|
||||
List<PatchedApplication> patchedApps = getPatchedApps();
|
||||
List<PatchedApplication> toRemove = [];
|
||||
for (PatchedApplication app in patchedApps) {
|
||||
bool isRemove = await isAppUninstalled(app, isRoot);
|
||||
bool isRemove = await isAppUninstalled(app, isRooted);
|
||||
if (isRemove) {
|
||||
toRemove.add(app);
|
||||
} else {
|
||||
@@ -133,9 +139,9 @@ class ManagerAPI {
|
||||
await setPatchedApps(patchedApps);
|
||||
}
|
||||
|
||||
Future<bool> isAppUninstalled(PatchedApplication app, bool isRoot) async {
|
||||
Future<bool> isAppUninstalled(PatchedApplication app, bool isRooted) async {
|
||||
bool existsRoot = false;
|
||||
if (isRoot) {
|
||||
if (isRooted) {
|
||||
existsRoot = await _rootAPI.isAppInstalled(app.packageName);
|
||||
}
|
||||
bool existsNonRoot = await DeviceApps.isAppInstalled(app.packageName);
|
||||
|
||||
@@ -146,7 +146,7 @@ class PatcherAPI {
|
||||
Future<bool> installPatchedFile(PatchedApplication patchedApp) async {
|
||||
if (_outFile != null) {
|
||||
try {
|
||||
if (patchedApp.isRooted && !patchedApp.isFromStorage) {
|
||||
if (patchedApp.isRooted) {
|
||||
return _rootAPI.installApp(
|
||||
patchedApp.packageName,
|
||||
patchedApp.apkFilePath,
|
||||
|
||||
Reference in New Issue
Block a user