diff --git a/lib/app_sources/fdroidrepo.dart b/lib/app_sources/fdroidrepo.dart index 1eb02625..f4afe082 100644 --- a/lib/app_sources/fdroidrepo.dart +++ b/lib/app_sources/fdroidrepo.dart @@ -88,8 +88,8 @@ class FDroidRepo extends AppSource { @override void runOnAddAppInputChange(String userInput) { - this.additionalSourceAppSpecificSettingFormItems = - this.additionalSourceAppSpecificSettingFormItems.map((row) { + additionalSourceAppSpecificSettingFormItems = + additionalSourceAppSpecificSettingFormItems.map((row) { row = row.map((item) { if (item.key == 'appIdOrName') { try { diff --git a/lib/providers/apps_provider.dart b/lib/providers/apps_provider.dart index 9c125215..6d5b6741 100644 --- a/lib/providers/apps_provider.dart +++ b/lib/providers/apps_provider.dart @@ -220,7 +220,9 @@ Future downloadFile(String url, String fileName, bool fileNameHasExt, if (ext.endsWith('"') || ext.endsWith("other")) { ext = ext.substring(0, ext.length - 1); } - if (url.toLowerCase().endsWith('.apk') && ext != 'apk') { + if (((Uri.tryParse(url)?.path ?? url).toLowerCase().endsWith('.apk') || + ext == 'attachment') && + ext != 'apk') { ext = 'apk'; } fileName = fileName.split('/').last; // Ensure the fileName is a file name diff --git a/pubspec.yaml b/pubspec.yaml index d3cfec25..18aec9b8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.1.12+2269 +version: 1.1.13+2270 environment: sdk: '>=3.0.0 <4.0.0'