mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 13:15:35 +03:00
always download unsupported image
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
This commit is contained in:
parent
b5fa83c72d
commit
6b5e3e903c
3 changed files with 5 additions and 21 deletions
|
@ -474,7 +474,7 @@ public final class ThumbnailsCacheManager {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (fileFragment instanceof PreviewImageFragment) {
|
if (fileFragment instanceof PreviewImageFragment) {
|
||||||
((PreviewImageFragment) fileFragment).setErrorPreviewMessage();
|
((PreviewImageFragment) fileFragment).handleUnsupportedImage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
|
|
@ -721,28 +721,14 @@ class PreviewImageFragment : FileFragment(), Injectable {
|
||||||
binding.emptyListProgress.visibility = View.GONE
|
binding.emptyListProgress.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setErrorPreviewMessage() {
|
fun handleUnsupportedImage() {
|
||||||
try {
|
try {
|
||||||
if (activity != null) {
|
(activity as? PreviewImageActivity)?.requestForDownload(file) ?: context?.let {
|
||||||
Snackbar.make(
|
Snackbar.make(
|
||||||
binding.emptyListView,
|
binding.emptyListView,
|
||||||
R.string.resized_image_not_possible_download,
|
resources.getString(R.string.could_not_download_image),
|
||||||
Snackbar.LENGTH_INDEFINITE
|
Snackbar.LENGTH_INDEFINITE
|
||||||
)
|
).show()
|
||||||
.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()
|
|
||||||
}
|
}
|
||||||
} catch (e: IllegalArgumentException) {
|
} catch (e: IllegalArgumentException) {
|
||||||
Log_OC.d(TAG, e.message)
|
Log_OC.d(TAG, e.message)
|
||||||
|
|
|
@ -727,8 +727,6 @@
|
||||||
|
|
||||||
<string name="sync_in_progress">Fetching most recent version of the file.</string>
|
<string name="sync_in_progress">Fetching most recent version of the file.</string>
|
||||||
|
|
||||||
<string name="resized_image_not_possible_download">No resized image available. Download full image?</string>
|
|
||||||
|
|
||||||
<string name="store_short_desc">The self-hosted productivity platform that keeps you in control</string>
|
<string name="store_short_desc">The self-hosted productivity platform that keeps you in control</string>
|
||||||
<string name="store_full_desc">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</string>
|
<string name="store_full_desc">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</string>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue