Fix HTML release asset download (#1578)

This commit is contained in:
Imran Remtulla
2024-05-05 21:43:05 -04:00
parent a3fddc5400
commit 8cee268d13
2 changed files with 3 additions and 3 deletions

View File

@@ -175,9 +175,8 @@ class _AppPageState extends State<AppPage> {
tr('downloadX', args: [tr('releaseAsset').toLowerCase()]),
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.labelSmall!.copyWith(
decoration:
changeLogFn != null ? TextDecoration.underline : null,
fontStyle: changeLogFn != null ? FontStyle.italic : null,
decoration: TextDecoration.underline,
fontStyle: FontStyle.italic,
),
),
),

View File

@@ -223,6 +223,7 @@ Future<File> downloadFile(String url, String fileName, bool fileNameHasExt,
if (url.toLowerCase().endsWith('.apk') && ext != 'apk') {
ext = 'apk';
}
fileName = fileName.split('/').last; // Ensure the fileName is a file name
File downloadedFile = File('$destDir/$fileName.$ext');
if (fileNameHasExt) {
// If the user says the filename already has an ext, ignore whatever you inferred from above