From fb865c54e8cc3812205c31f6d070a66b953ba2aa Mon Sep 17 00:00:00 2001 From: woheller69 Date: Fri, 5 Jan 2024 14:20:21 +0100 Subject: [PATCH] Update V1.40 Use image/jpeg as default mime type for images --- app/build.gradle | 4 ++-- app/src/main/java/org/woheller69/gptassist/MainActivity.java | 2 +- fastlane/metadata/android/en-US/changelogs/140.txt | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/140.txt diff --git a/app/build.gradle b/app/build.gradle index a2117ed..3dd9094 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId "org.woheller69.gptassist" minSdk 21 targetSdk 33 - versionCode 130 - versionName "1.30" + versionCode 140 + versionName "1.40" } buildTypes { diff --git a/app/src/main/java/org/woheller69/gptassist/MainActivity.java b/app/src/main/java/org/woheller69/gptassist/MainActivity.java index cf53c71..2770935 100644 --- a/app/src/main/java/org/woheller69/gptassist/MainActivity.java +++ b/app/src/main/java/org/woheller69/gptassist/MainActivity.java @@ -334,7 +334,7 @@ public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMen request.addRequestHeader("Accept-Language", "en-US,en;q=0.7,he;q=0.3"); request.addRequestHeader("Referer", url); request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); //Notify client once download is completed! - String filename = URLUtil.guessFileName(url, null, null); + String filename = URLUtil.guessFileName(url, null, "image/jpeg"); request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, filename); Toast.makeText(this,getString(R.string.download)+"\n"+filename, Toast.LENGTH_SHORT).show(); DownloadManager dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE); diff --git a/fastlane/metadata/android/en-US/changelogs/140.txt b/fastlane/metadata/android/en-US/changelogs/140.txt new file mode 100644 index 0000000..7804201 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/140.txt @@ -0,0 +1 @@ +Use image/jpeg as default mime type for images \ No newline at end of file