mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Merge pull request #10430 from Tiam-Abderezai/bugfix/10405/check_context_in_PreviewImageFragment
Fix #10405 Context check for ImagePreviewFragment
This commit is contained in:
commit
ac948df165
1 changed files with 1 additions and 1 deletions
|
@ -718,7 +718,7 @@ public class PreviewImageFragment extends FileFragment implements Injectable {
|
|||
PreviewImageActivity activity = (PreviewImageActivity) getActivity();
|
||||
if (activity != null) {
|
||||
activity.requestForDownload(getFile());
|
||||
} else {
|
||||
} else if (getContext() != null) {
|
||||
Snackbar.make(binding.emptyListView,
|
||||
getResources().getString(R.string.could_not_download_image),
|
||||
Snackbar.LENGTH_INDEFINITE).show();
|
||||
|
|
Loading…
Reference in a new issue