Compare commits

...

18 Commits

Author SHA1 Message Date
oSumAtrIX
fa0f250e27 build: bump patcher dependency version to v5.0.1 2022-09-23 07:45:44 +02:00
oSumAtrIX
185d883b65 feat: acknowledgements section for template feature-issue 2022-09-23 07:33:30 +02:00
oSumAtrIX
9d8b2e1a35 feat: acknowledgements section for template feature-issue 2022-09-23 07:32:44 +02:00
Alberto Ponces
a6a7ff5040 build: Bump version to v0.0.19 2022-09-23 00:39:44 +01:00
Alberto Ponces
1028ec8e2a fix: Prevent Manager from crashing when a patcher exception occurs and print its stack trace on installer's log 2022-09-23 00:38:42 +01:00
Alberto Ponces
f9242c1958 build: Bump version to v0.0.18 2022-09-22 14:04:59 +01:00
Alberto Ponces
f9865166b0 fix: TikTok integrations and settings patches should be merged if needed 2022-09-22 14:02:07 +01:00
Alberto Ponces
f0f934f6a1 fix: Prevent printing of denied root permission exceptions for unrooted users 2022-09-22 14:01:05 +01:00
Alberto Ponces
3d25655851 fix: Uninstall button should always be shown 2022-09-22 09:46:28 +01:00
oSumAtrIX
733190e76c build: bump version to v0.0.17+17 2022-09-21 05:19:26 +02:00
oSumAtrIX
ab312dec43 build: bump patcher dependency version to v5.0.0 2022-09-21 04:16:19 +02:00
oSumAtrIX
70159b8cd8 Update Crowdin configuration file 2022-09-20 19:17:29 +02:00
oSumAtrIX
97060913a2 Update Crowdin configuration file 2022-09-20 19:07:41 +02:00
oSumAtrIX
4a0c5f9935 Update Crowdin configuration file 2022-09-20 12:06:23 +02:00
Alberto Ponces
f643a31455 Merge branch 'flutter' of github.com:revanced/revanced-manager into flutter 2022-09-20 10:05:06 +01:00
Alberto Ponces
03b87a50ea fix: Use a proper app name when MicroG is applied 2022-09-20 10:04:51 +01:00
Alberto Ponces
4631982d42 fix: Use original packageName to get compatible patches 2022-09-20 10:04:02 +01:00
Palm
4c4b694db9 chore: update English language capitalizations and format (#228)
* chore: update English language capitalizations and format

* chore: revert capitalization changes as requested
2022-09-20 12:27:20 +05:30
12 changed files with 280 additions and 207 deletions

View File

@@ -112,3 +112,17 @@ body:
description: Add additional context here. description: Add additional context here.
validations: validations:
required: false required: false
- type: checkboxes
id: acknowledgements
attributes:
label: Acknowledgements
description: Your issue will be closed if you haven't done these steps.
options:
- label: I have searched the existing issues and this is a new and no duplicate or related to another open issue.
required: true
- label: I have written a short but informative title.
required: true
- label: I filled out all of the requested information in this issue properly.
required: true
- label: The issue is related solely to the ReVanced Manager
required: true

View File

@@ -43,4 +43,18 @@ body:
label: Additional context label: Additional context
description: Add additional context here. description: Add additional context here.
validations: validations:
required: false required: false
- type: checkboxes
id: acknowledgements
attributes:
label: Acknowledgements
description: Your issue will be closed if you haven't done these steps.
options:
- label: I have searched the existing issues and this is a new and no duplicate or related to another open issue.
required: true
- label: I have written a short but informative title.
required: true
- label: I filled out all of the requested information in this issue properly.
required: true
- label: The issue is related solely to the ReVanced Manager
required: true

View File

@@ -71,7 +71,7 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
// ReVanced // ReVanced
implementation "app.revanced:revanced-patcher:4.4.2" implementation "app.revanced:revanced-patcher:5.0.1"
// Signing & aligning // Signing & aligning
implementation("org.bouncycastle:bcpkix-jdk15on:1.70") implementation("org.bouncycastle:bcpkix-jdk15on:1.70")

View File

@@ -74,7 +74,6 @@ class MainActivity : FlutterActivity() {
result.notImplemented() result.notImplemented()
} }
} }
else -> result.notImplemented() else -> result.notImplemented()
} }
} }
@@ -101,161 +100,174 @@ class MainActivity : FlutterActivity() {
val integrations = File(integrationsPath) val integrations = File(integrationsPath)
val keyStoreFile = File(keyStoreFilePath) val keyStoreFile = File(keyStoreFilePath)
val patches = DexPatchBundle(
patchBundleFilePath,
DexClassLoader(
patchBundleFilePath,
cacheDirPath,
null,
javaClass.classLoader
)
).loadPatches().filter { patch -> selectedPatches.any { it == patch.patchName } }
Thread { Thread {
handler.post { try {
installerChannel.invokeMethod( val patches = DexPatchBundle(
"update", patchBundleFilePath,
mapOf( DexClassLoader(
"progress" to 0.1, patchBundleFilePath,
"header" to "",
"log" to "Copying original apk"
)
)
}
originalFile.copyTo(inputFile, true)
handler.post {
installerChannel.invokeMethod(
"update",
mapOf(
"progress" to 0.2,
"header" to "Unpacking apk...",
"log" to "Unpacking input apk"
)
)
}
val patcher =
Patcher(
PatcherOptions(
inputFile,
cacheDirPath, cacheDirPath,
resourcePatching, null,
Aapt.binary(applicationContext).absolutePath, javaClass.classLoader
cacheDirPath,
logger = ManagerLogger()
) )
) ).loadPatches().filter { patch -> selectedPatches.any { it == patch.patchName } }
handler.post {
installerChannel.invokeMethod(
"update",
mapOf("progress" to 0.3, "header" to "", "log" to "")
)
}
if (mergeIntegrations) {
handler.post { handler.post {
installerChannel.invokeMethod( installerChannel.invokeMethod(
"update", "update",
mapOf( mapOf(
"progress" to 0.4, "progress" to 0.1,
"header" to "Merging integrations...", "header" to "",
"log" to "Merging integrations" "log" to "Copying original apk"
) )
) )
} }
patcher.addFiles(listOf(integrations)) {} originalFile.copyTo(inputFile, true)
}
handler.post { handler.post {
installerChannel.invokeMethod( installerChannel.invokeMethod(
"update", "update",
mapOf( mapOf(
"progress" to 0.5, "progress" to 0.2,
"header" to "Applying patches...", "header" to "Unpacking apk...",
"log" to "" "log" to "Unpacking input apk"
)
) )
) }
} val patcher =
patcher.addPatches(patches) Patcher(
patcher.applyPatches().forEach { (patch, res) -> PatcherOptions(
if (res.isSuccess) { inputFile,
val msg = "[success] $patch" cacheDirPath,
resourcePatching,
Aapt.binary(applicationContext).absolutePath,
cacheDirPath,
logger = ManagerLogger()
)
)
handler.post {
installerChannel.invokeMethod(
"update",
mapOf("progress" to 0.3, "header" to "", "log" to "")
)
}
if (mergeIntegrations) {
handler.post { handler.post {
installerChannel.invokeMethod( installerChannel.invokeMethod(
"update", "update",
mapOf( mapOf(
"progress" to 0.5, "progress" to 0.4,
"header" to "", "header" to "Merging integrations...",
"log" to msg "log" to "Merging integrations"
) )
) )
} }
return@forEach patcher.addFiles(listOf(integrations)) {}
} }
val msg = "[error] $patch:" + res.exceptionOrNull()!!
handler.post { handler.post {
installerChannel.invokeMethod( installerChannel.invokeMethod(
"update", "update",
mapOf("progress" to 0.5, "header" to "", "log" to msg) mapOf(
"progress" to 0.5,
"header" to "Applying patches...",
"log" to ""
)
) )
} }
}
handler.post { patcher.addPatches(patches)
installerChannel.invokeMethod( patcher.applyPatches().forEach { (patch, res) ->
"update", if (res.isSuccess) {
mapOf( val msg = "[success] $patch"
"progress" to 0.7, handler.post {
"header" to "Repacking apk...", installerChannel.invokeMethod(
"log" to "Repacking patched apk" "update",
) mapOf(
) "progress" to 0.5,
} "header" to "",
val res = patcher.save() "log" to msg
ZipFile(patchedFile).use { file -> )
res.dexFiles.forEach { )
file.addEntryCompressData( }
ZipEntry.createWithName(it.name), return@forEach
it.stream.readBytes() }
val msg = "[error] $patch:" + res.exceptionOrNull()!!
handler.post {
installerChannel.invokeMethod(
"update",
mapOf("progress" to 0.5, "header" to "", "log" to msg)
)
}
}
handler.post {
installerChannel.invokeMethod(
"update",
mapOf(
"progress" to 0.7,
"header" to "Repacking apk...",
"log" to "Repacking patched apk"
)
) )
} }
res.resourceFile?.let { val res = patcher.save()
ZipFile(patchedFile).use { file ->
res.dexFiles.forEach {
file.addEntryCompressData(
ZipEntry.createWithName(it.name),
it.stream.readBytes()
)
}
res.resourceFile?.let {
file.copyEntriesFromFileAligned(
ZipFile(it),
ZipAligner::getEntryAlignment
)
}
file.copyEntriesFromFileAligned( file.copyEntriesFromFileAligned(
ZipFile(it), ZipFile(inputFile),
ZipAligner::getEntryAlignment ZipAligner::getEntryAlignment
) )
} }
file.copyEntriesFromFileAligned( handler.post {
ZipFile(inputFile), installerChannel.invokeMethod(
ZipAligner::getEntryAlignment "update",
) mapOf(
} "progress" to 0.9,
handler.post { "header" to "Signing apk...",
installerChannel.invokeMethod( "log" to ""
"update", )
mapOf(
"progress" to 0.9,
"header" to "Signing apk...",
"log" to ""
) )
) }
} Signer("ReVanced", "s3cur3p@ssw0rd").signApk(patchedFile, outFile, keyStoreFile)
Signer("ReVanced", "s3cur3p@ssw0rd").signApk(patchedFile, outFile, keyStoreFile)
handler.post { handler.post {
installerChannel.invokeMethod( installerChannel.invokeMethod(
"update", "update",
mapOf( mapOf(
"progress" to 1.0, "progress" to 1.0,
"header" to "Finished!", "header" to "Finished!",
"log" to "Finished!" "log" to "Finished!"
)
) )
) }
} catch (ex: Throwable) {
val stack = ex.stackTraceToString()
handler.post {
installerChannel.invokeMethod(
"update",
mapOf(
"progress" to -100.0,
"header" to "Aborting...",
"log" to "An error occurred! Aborting\nError:\n$stack"
)
)
}
} }
handler.post { result.success(null) } handler.post { result.success(null) }
} }.start()
.start()
} }
inner class ManagerLogger : Logger { inner class ManagerLogger : Logger {

View File

@@ -14,18 +14,18 @@
"widgetTitle": "Dashboard", "widgetTitle": "Dashboard",
"updatesSubtitle": "Updates", "updatesSubtitle": "Updates",
"patchedSubtitle": "Patched Applications", "patchedSubtitle": "Patched Applications",
"updatesAvailable": "Updates Available", "updatesAvailable": "Updates available",
"noUpdates": "No updates available", "noUpdates": "No updates available",
"noInstallations": "No patched applications installed", "noInstallations": "No patched applications installed",
"installed": "Installed", "installed": "Installed",
"updateDialogTitle": "Update", "updateDialogTitle": "Update Manager",
"updateDialogText": "Are you sure you want to download and update Manager?", "updateDialogText": "Are you sure you want to download and update ReVanced Manager?",
"notificationTitle": "ReVanced Manager was updated!", "notificationTitle": "ReVanced Manager was updated",
"notificationText": "Tap to open the app", "notificationText": "Tap to open the app",
"downloadingMessage": "Downloading update!", "downloadingMessage": "Downloading update...",
"installingMessage": "Installing update... Hang on!", "installingMessage": "Installing update...",
"errorDownloadMessage": "Unable to download update!", "errorDownloadMessage": "Unable to download update",
"errorInstallMessage": "Unable to install update!", "errorInstallMessage": "Unable to install update",
"noConnection": "No internet connection" "noConnection": "No internet connection"
}, },
"applicationItem": { "applicationItem": {
@@ -34,7 +34,7 @@
"changelogLabel": "Changelog" "changelogLabel": "Changelog"
}, },
"latestCommitCard": { "latestCommitCard": {
"loadingLabel": "Loading", "loadingLabel": "Loading...",
"timeagoLabel": "{time} ago", "timeagoLabel": "{time} ago",
"patcherLabel": "Patcher: ", "patcherLabel": "Patcher: ",
"managerLabel": "Manager: ", "managerLabel": "Manager: ",
@@ -44,12 +44,12 @@
"widgetTitle": "Patcher", "widgetTitle": "Patcher",
"patchButton": "Patch", "patchButton": "Patch",
"patchDialogTitle": "Warning", "patchDialogTitle": "Warning",
"patchDialogText": "You have selected a resource patch and a split APK installation was detected so patching errors can occur.\nAre you sure you want to proceed with patching a split base APK?" "patchDialogText": "You have selected a resource patch and a split APK installation was detected so patching errors may occur.\nAre you sure you want to proceed with patching a split base APK?"
}, },
"appSelectorCard": { "appSelectorCard": {
"widgetTitle": "Select application", "widgetTitle": "Select application",
"widgetTitleSelected": "Selected application", "widgetTitleSelected": "Selected application",
"widgetSubtitle": "No application selected.", "widgetSubtitle": "No application selected",
"noAppsLabel": "No applications found.", "noAppsLabel": "No applications found.",
"currentVersion": "Current", "currentVersion": "Current",
"recommendedVersion": "Recommended", "recommendedVersion": "Recommended",
@@ -58,11 +58,11 @@
"patchSelectorCard": { "patchSelectorCard": {
"widgetTitle": "Select patches", "widgetTitle": "Select patches",
"widgetTitleSelected": "Selected patches", "widgetTitleSelected": "Selected patches",
"widgetSubtitle": "Select an application first.", "widgetSubtitle": "Select an application first",
"widgetEmptySubtitle": "No patches selected." "widgetEmptySubtitle": "No patches selected"
}, },
"socialMediaCard": { "socialMediaCard": {
"widgetTitle": "Social Media", "widgetTitle": "Socials",
"widgetSubtitle": "We are online!" "widgetSubtitle": "We are online!"
}, },
"appSelectorView": { "appSelectorView": {
@@ -75,7 +75,7 @@
"viewTitle": "Select patches", "viewTitle": "Select patches",
"searchBarHint": "Search patches", "searchBarHint": "Search patches",
"doneButton": "Done", "doneButton": "Done",
"noPatchesFound": "No patches found for the selected app." "noPatchesFound": "No patches found for the selected app"
}, },
"patchItem": { "patchItem": {
"unsupportedWarningButton": "Unsupported version", "unsupportedWarningButton": "Unsupported version",
@@ -113,13 +113,13 @@
"frenchOption": "French", "frenchOption": "French",
"sourcesLabel": "Sources", "sourcesLabel": "Sources",
"sourcesLabelHint": "Configure your custom sources", "sourcesLabelHint": "Configure your custom sources",
"orgPatchesLabel" : "Patches Org", "orgPatchesLabel" : "Patches Organization",
"sourcesPatchesLabel" : "Patches Source", "sourcesPatchesLabel" : "Patches Source",
"orgIntegrationsLabel": "Integrations Org", "orgIntegrationsLabel": "Integrations Organization",
"sourcesIntegrationsLabel": "Integrations Source", "sourcesIntegrationsLabel": "Integrations Source",
"sourcesResetDialogTitle": "Reset", "sourcesResetDialogTitle": "Reset",
"sourcesResetDialogText": "Are you sure you want to reset custom sources to their default values?", "sourcesResetDialogText": "Are you sure you want to reset custom sources to their default values?",
"apiURLResetDialogText": "Are you sure you want to reset API URL to their default values?", "apiURLResetDialogText": "Are you sure you want to reset API URL to its default value?",
"contributorsLabel": "Contributors", "contributorsLabel": "Contributors",
"contributorsHint": "A list of contributors of ReVanced", "contributorsHint": "A list of contributors of ReVanced",
"logsLabel": "Logs", "logsLabel": "Logs",

3
crowdin.yml Normal file
View File

@@ -0,0 +1,3 @@
files:
- source: /assets/i18n/en.json
translation: /assets/i18n/%two_letters_code%.json

View File

@@ -70,10 +70,14 @@ class PatcherAPI {
} }
Future<List<Patch>> getFilteredPatches(String packageName) async { Future<List<Patch>> getFilteredPatches(String packageName) async {
String newPackageName = packageName.replaceFirst(
'app.revanced.',
'com.google.',
);
return _patches return _patches
.where((patch) => .where((patch) =>
!patch.name.contains('settings') && !patch.name.contains('settings') &&
patch.compatiblePackages.any((pack) => pack.name == packageName)) patch.compatiblePackages.any((pack) => pack.name == newPackageName))
.toList(); .toList();
} }
@@ -85,19 +89,25 @@ class PatcherAPI {
Future<bool> needsIntegrations(List<Patch> selectedPatches) async { Future<bool> needsIntegrations(List<Patch> selectedPatches) async {
return selectedPatches.any( return selectedPatches.any(
(patch) => patch.dependencies.contains('integrations'), (patch) => patch.dependencies.any(
(dep) => dep.contains('integrations'),
),
); );
} }
Future<bool> needsResourcePatching(List<Patch> selectedPatches) async { Future<bool> needsResourcePatching(List<Patch> selectedPatches) async {
return selectedPatches.any( return selectedPatches.any(
(patch) => patch.dependencies.any((dep) => dep.contains('resource-')), (patch) => patch.dependencies.any(
(dep) => dep.contains('resource-'),
),
); );
} }
Future<bool> needsSettingsPatch(List<Patch> selectedPatches) async { Future<bool> needsSettingsPatch(List<Patch> selectedPatches) async {
return selectedPatches.any( return selectedPatches.any(
(patch) => patch.dependencies.contains('settings'), (patch) => patch.dependencies.any(
(dep) => dep.contains('settings'),
),
); );
} }

View File

@@ -7,8 +7,12 @@ class RootAPI {
Future<bool> hasRootPermissions() async { Future<bool> hasRootPermissions() async {
try { try {
bool? isRooted = await Root.isRooted(); bool? isRooted = await Root.isRootAvailable();
return isRooted != null && isRooted; if (isRooted != null && isRooted) {
isRooted = await Root.isRooted();
return isRooted != null && isRooted;
}
return false;
} on Exception { } on Exception {
return false; return false;
} }

View File

@@ -78,14 +78,20 @@ class InstallerViewModel extends BaseViewModel {
} }
void update(double value, String header, String log) { void update(double value, String header, String log) {
if (value > 0) { if (value >= 0.0) {
progress = value; progress = value;
} }
isPatching = progress == 1.0 ? false : true; if (value == 0.0) {
if (progress == 0.0) {
logs = ''; logs = '';
isPatching = true;
isInstalled = false; isInstalled = false;
hasErrors = false; hasErrors = false;
} else if (value == 1.0) {
isPatching = false;
hasErrors = false;
} else if (value == -100.0) {
isPatching = false;
hasErrors = true;
} }
if (header.isNotEmpty) { if (header.isNotEmpty) {
headerLogs = header; headerLogs = header;
@@ -95,6 +101,9 @@ class InstallerViewModel extends BaseViewModel {
logs += '\n'; logs += '\n';
} }
logs += log; logs += log;
if (logs[logs.length - 1] == '\n') {
logs = logs.substring(0, logs.length - 1);
}
Future.delayed(const Duration(milliseconds: 500)).then((value) { Future.delayed(const Duration(milliseconds: 500)).then((value) {
scrollController.animateTo( scrollController.animateTo(
scrollController.position.maxScrollExtent, scrollController.position.maxScrollExtent,
@@ -117,12 +126,14 @@ class InstallerViewModel extends BaseViewModel {
_patches, _patches,
); );
} catch (e) { } catch (e) {
hasErrors = true; update(
update(-1.0, 'Aborting...', 'An error occurred! Aborting\nError: $e'); -100.0,
'Aborting...',
'An error occurred! Aborting\nError:\n$e',
);
} }
} else { } else {
hasErrors = true; update(-100.0, 'Aborting...', 'No app or patches selected! Aborting');
update(-1.0, 'Aborting...', 'No app or patches selected! Aborting');
} }
if (FlutterBackground.isBackgroundExecutionEnabled) { if (FlutterBackground.isBackgroundExecutionEnabled) {
try { try {
@@ -132,7 +143,6 @@ class InstallerViewModel extends BaseViewModel {
} }
} }
await Wakelock.disable(); await Wakelock.disable();
isPatching = false;
} }
void installResult(BuildContext context, bool installAsRoot) async { void installResult(BuildContext context, bool installAsRoot) async {
@@ -178,6 +188,7 @@ class InstallerViewModel extends BaseViewModel {
_app.patchDate = DateTime.now(); _app.patchDate = DateTime.now();
_app.appliedPatches = _patches.map((p) => p.name).toList(); _app.appliedPatches = _patches.map((p) => p.name).toList();
if (hasMicroG) { if (hasMicroG) {
_app.name += ' ReVanced';
_app.packageName = _app.packageName.replaceFirst( _app.packageName = _app.packageName.replaceFirst(
'com.google.', 'com.google.',
'app.revanced.', 'app.revanced.',

View File

@@ -104,52 +104,50 @@ class AppInfoView extends StatelessWidget {
), ),
), ),
), ),
if (app.isRooted) VerticalDivider(
VerticalDivider( color: Theme.of(context).canvasColor,
color: Theme.of(context).canvasColor, indent: 12.0,
indent: 12.0, endIndent: 12.0,
endIndent: 12.0, width: 1.0,
width: 1.0, ),
), Expanded(
if (app.isRooted) child: Material(
Expanded( type: MaterialType.transparency,
child: Material( child: InkWell(
type: MaterialType.transparency, borderRadius: BorderRadius.circular(16.0),
child: InkWell( onTap: () => model.showUninstallDialog(
borderRadius: BorderRadius.circular(16.0), context,
onTap: () => model.showUninstallDialog( app,
context, false,
app, ),
false, child: Column(
), mainAxisAlignment:
child: Column( MainAxisAlignment.center,
mainAxisAlignment: children: <Widget>[
MainAxisAlignment.center, Icon(
children: <Widget>[ Icons.delete_outline,
Icon( color: Theme.of(context)
Icons.delete_outline, .colorScheme
color: Theme.of(context) .primary,
.colorScheme ),
.primary, const SizedBox(height: 10),
), I18nText(
const SizedBox(height: 10), 'appInfoView.uninstallButton',
I18nText( child: Text(
'appInfoView.uninstallButton', '',
child: Text( style: TextStyle(
'', color: Theme.of(context)
style: TextStyle( .colorScheme
color: Theme.of(context) .primary,
.colorScheme fontWeight: FontWeight.bold,
.primary,
fontWeight: FontWeight.bold,
),
), ),
), ),
], ),
), ],
), ),
), ),
), ),
),
VerticalDivider( VerticalDivider(
color: Theme.of(context).canvasColor, color: Theme.of(context).canvasColor,
indent: 12.0, indent: 12.0,

View File

@@ -20,20 +20,26 @@ class AppInfoViewModel extends BaseViewModel {
final PatcherAPI _patcherAPI = locator<PatcherAPI>(); final PatcherAPI _patcherAPI = locator<PatcherAPI>();
final RootAPI _rootAPI = RootAPI(); final RootAPI _rootAPI = RootAPI();
Future<void> uninstallApp(PatchedApplication app, bool onlyUnpatch) async { Future<void> uninstallApp(
BuildContext context,
PatchedApplication app,
bool onlyUnpatch,
) async {
bool isUninstalled = true;
if (app.isRooted) { if (app.isRooted) {
bool hasRootPermissions = await _rootAPI.hasRootPermissions(); bool hasRootPermissions = await _rootAPI.hasRootPermissions();
if (hasRootPermissions) { if (hasRootPermissions) {
_rootAPI.deleteApp(app.packageName, app.apkFilePath); await _rootAPI.deleteApp(app.packageName, app.apkFilePath);
_managerAPI.deletePatchedApp(app);
if (!onlyUnpatch) { if (!onlyUnpatch) {
DeviceApps.uninstallApp(app.packageName); await DeviceApps.uninstallApp(app.packageName);
} }
} }
} else { } else {
DeviceApps.uninstallApp(app.packageName).then( isUninstalled = await DeviceApps.uninstallApp(app.packageName);
(value) => _managerAPI.deletePatchedApp(app), }
); if (isUninstalled) {
await _managerAPI.deletePatchedApp(app);
locator<HomeViewModel>().initialize(context);
} }
} }
@@ -87,8 +93,7 @@ class AppInfoViewModel extends BaseViewModel {
CustomMaterialButton( CustomMaterialButton(
label: I18nText('yesButton'), label: I18nText('yesButton'),
onPressed: () { onPressed: () {
uninstallApp(app, onlyUnpatch); uninstallApp(context, app, onlyUnpatch);
locator<HomeViewModel>().initialize(context);
Navigator.of(context).pop(); Navigator.of(context).pop();
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
@@ -97,8 +102,7 @@ class AppInfoViewModel extends BaseViewModel {
), ),
); );
} else { } else {
uninstallApp(app, onlyUnpatch); uninstallApp(context, app, onlyUnpatch);
locator<HomeViewModel>().initialize(context);
Navigator.of(context).pop(); Navigator.of(context).pop();
} }
} }

View File

@@ -4,7 +4,7 @@ homepage: https://github.com/revanced/revanced-manager
publish_to: 'none' publish_to: 'none'
version: 0.0.16+16 version: 0.0.19+19
environment: environment:
sdk: ">=2.17.5 <3.0.0" sdk: ">=2.17.5 <3.0.0"
@@ -54,7 +54,10 @@ dependencies:
path_provider: ^2.0.11 path_provider: ^2.0.11
permission_handler: ^10.0.0 permission_handler: ^10.0.0
pull_to_refresh: ^2.0.0 pull_to_refresh: ^2.0.0
root: ^2.0.2 root:
git:
url: https://github.com/gokul1630/root
ref: main
share_extend: ^2.0.0 share_extend: ^2.0.0
shared_preferences: ^2.0.15 shared_preferences: ^2.0.15
skeletons: ^0.0.3 skeletons: ^0.0.3