#275 when deleting the last image using preview jump to vault content
As well as fixing a logged IndexOutOfBoundsException when deleting the image with the last indices from the list.
This commit is contained in:
parent
bd36b4d337
commit
d8d4c6f9e7
@ -203,7 +203,17 @@ class ImagePreviewActivity : BaseActivity(), ImagePreviewView, ConfirmDeleteClou
|
|||||||
|
|
||||||
override fun onImageDeleted(index: Int) {
|
override fun onImageDeleted(index: Int) {
|
||||||
imagePreviewSliderAdapter.deletePage(index)
|
imagePreviewSliderAdapter.deletePage(index)
|
||||||
updateTitle(index)
|
|
||||||
|
presenter.pageIndexes.size.let {
|
||||||
|
when {
|
||||||
|
it == 0 -> {
|
||||||
|
showMessage(getString(R.string.dialog_no_more_images_to_display ))
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
it > index -> updateTitle(index)
|
||||||
|
it <= index -> updateTitle(index - 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setControlViewVisibility(visibility: Int) {
|
private fun setControlViewVisibility(visibility: Int) {
|
||||||
|
@ -433,6 +433,8 @@
|
|||||||
<string name="dialog_beta_confirmation_title">Beta release</string>
|
<string name="dialog_beta_confirmation_title">Beta release</string>
|
||||||
<string name="dialog_beta_confirmation">This is a beta release which introduces the support of vault format 7. Please make sure that you don\'t use your production vault for testing or have a good backup strategy.</string>
|
<string name="dialog_beta_confirmation">This is a beta release which introduces the support of vault format 7. Please make sure that you don\'t use your production vault for testing or have a good backup strategy.</string>
|
||||||
|
|
||||||
|
<string name="dialog_no_more_images_to_display">No more images to display…</string>
|
||||||
|
|
||||||
<string name="permission_snackbar_auth_local_vault">Cryptomator needs storage access to use local vaults</string>
|
<string name="permission_snackbar_auth_local_vault">Cryptomator needs storage access to use local vaults</string>
|
||||||
<string name="permission_snackbar_auth_auto_upload">Cryptomator needs storage access to use auto photo upload</string>
|
<string name="permission_snackbar_auth_auto_upload">Cryptomator needs storage access to use auto photo upload</string>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user