diff --git a/app/src/main/java/com/owncloud/android/datamodel/ThumbnailsCacheManager.java b/app/src/main/java/com/owncloud/android/datamodel/ThumbnailsCacheManager.java
index 9bf6a7f7e9bd..0cadc34a19c8 100644
--- a/app/src/main/java/com/owncloud/android/datamodel/ThumbnailsCacheManager.java
+++ b/app/src/main/java/com/owncloud/android/datamodel/ThumbnailsCacheManager.java
@@ -474,7 +474,7 @@ protected void onPostExecute(Bitmap bitmap) {
}
} else {
if (fileFragment instanceof PreviewImageFragment) {
- ((PreviewImageFragment) fileFragment).setErrorPreviewMessage();
+ ((PreviewImageFragment) fileFragment).handleUnsupportedImage();
}
}
}).start();
diff --git a/app/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.kt b/app/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.kt
index 96cc11fc2468..842a5d4b62c9 100644
--- a/app/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.kt
+++ b/app/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.kt
@@ -721,28 +721,14 @@ class PreviewImageFragment : FileFragment(), Injectable {
binding.emptyListProgress.visibility = View.GONE
}
- fun setErrorPreviewMessage() {
+ fun handleUnsupportedImage() {
try {
- if (activity != null) {
+ (activity as? PreviewImageActivity)?.requestForDownload(file) ?: context?.let {
Snackbar.make(
binding.emptyListView,
- R.string.resized_image_not_possible_download,
+ resources.getString(R.string.could_not_download_image),
Snackbar.LENGTH_INDEFINITE
- )
- .setAction(
- R.string.common_yes
- ) { v: View? ->
- val activity = activity as PreviewImageActivity?
- if (activity != null) {
- activity.requestForDownload(file)
- } else if (context != null) {
- Snackbar.make(
- binding.emptyListView,
- resources.getString(R.string.could_not_download_image),
- Snackbar.LENGTH_INDEFINITE
- ).show()
- }
- }.show()
+ ).show()
}
} catch (e: IllegalArgumentException) {
Log_OC.d(TAG, e.message)
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 5e4bb7f61a5c..197a931bc75d 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -727,8 +727,6 @@
Fetching most recent version of the file.
- No resized image available. Download full image?
-
The self-hosted productivity platform that keeps you in control
The self-hosted productivity platform that keeps you in control.\n\nFeatures:\n* Easy, modern interface, suited to the theme of your server\n* Upload files to your Nextcloud server\n* Share them with others\n* Keep your favorite files and folders synced\n* Search across all folders on your server\n* Auto Upload for photos and videos taken by your device\n* Keep up to date with notifications\n* Multi-account support\n* Secure access to your data with fingerprint or PIN\n* Integration with DAVx5 (formerly known as DAVdroid) for easy setup of calendar and contacts synchronization\n\nPlease report all issues at https://github.com/nextcloud/android/issues and discuss this app at https://help.nextcloud.com/c/clients/android\n\nNew to Nextcloud? Nextcloud is a private file sync and share and communication server. It is libre software, and you can host it yourself or pay a company to do it for you. That way, you are in control of your photos, your calendar and contact data, your documents and everything else.\n\nCheck out Nextcloud at https://nextcloud.com