Skip to content

Commit

Permalink
Fix HTML release asset download (#1578)
Browse files Browse the repository at this point in the history
  • Loading branch information
Imran Remtulla committed May 6, 2024
1 parent a3fddc5 commit 8cee268
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/pages/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
),
),
Expand Down
1 change: 1 addition & 0 deletions lib/providers/apps_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8cee268

Please sign in to comment.