Fix crash when deleting a lonely image
This commit is contained in:
parent
8da43a4452
commit
a4db2740a1
@ -119,7 +119,8 @@ class ImageViewer: FileViewerActivity() {
|
|||||||
.keepFullScreen()
|
.keepFullScreen()
|
||||||
.setTitle(R.string.warning)
|
.setTitle(R.string.warning)
|
||||||
.setPositiveButton(R.string.ok) { _, _ ->
|
.setPositiveButton(R.string.ok) { _, _ ->
|
||||||
if (gocryptfsVolume.removeFile(filePath)){
|
createPlaylist() //be sure the playlist is created before deleting if there is only one image
|
||||||
|
if (gocryptfsVolume.removeFile(filePath)) {
|
||||||
playlistNext(true)
|
playlistNext(true)
|
||||||
refreshPlaylist()
|
refreshPlaylist()
|
||||||
if (mappedPlaylist.size == 0) { //deleted all images of the playlist
|
if (mappedPlaylist.size == 0) { //deleted all images of the playlist
|
||||||
|
Loading…
Reference in New Issue
Block a user