Skip to content

Commit

Permalink
feat: append patch version to the APK name while sharing/exporting (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvanbhalara authored and TheAabedKhan committed Dec 5, 2023
1 parent eb6e75b commit 7df1ae7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/services/patcher_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ void exportPatchedFile(String appName, String version) {
if (outFile != null) {
final String newName = _getFileName(appName, version);
FlutterFileDialog.saveFile(
params: SaveFileDialogParams(
params: SaveFileDialogParams(
sourceFilePath: outFile!.path,
fileName: newName,
mimeTypesFilter: ['application/vnd.android.package-archive'],
Expand Down Expand Up @@ -269,8 +269,9 @@ void sharePatchedFile(String appName, String version) {
}

String _getFileName(String appName, String version) {
final String patchVersion = _managerAPI.patchesVersion!;
final String prefix = appName.toLowerCase().replaceAll(' ', '-');
final String newName = '$prefix-revanced_v$version.apk';
final String newName = '$prefix-revanced_v$version-patches_$patchVersion.apk';
return newName;
}

Expand Down

0 comments on commit 7df1ae7

Please sign in to comment.