Move to next photo after after moving a picture #437
This commit is contained in:
parent
2fb8ace334
commit
c7751f0231
@ -335,14 +335,12 @@ photo.setTitle = function(photoIDs) {
|
||||
|
||||
photo.setAlbum = function(photoIDs, albumID) {
|
||||
|
||||
let nextPhoto
|
||||
let previousPhoto
|
||||
let nextPhoto = null
|
||||
let previousPhoto = null
|
||||
|
||||
if (!photoIDs) return false
|
||||
if (photoIDs instanceof Array===false) photoIDs = [ photoIDs ]
|
||||
|
||||
if (visible.photo) lychee.goto(album.getID())
|
||||
|
||||
photoIDs.forEach(function(id, index, array) {
|
||||
|
||||
// Change reference for the next and previous photo
|
||||
@ -363,6 +361,11 @@ photo.setAlbum = function(photoIDs, albumID) {
|
||||
|
||||
albums.refresh()
|
||||
|
||||
// Go to next photo if there is a next photo and
|
||||
// next photo is not the current one. Show album otherwise.
|
||||
if (visible.photo() && nextPhoto!=null && nextPhoto!==photo.getID()) lychee.goto(album.getID() + '/' + nextPhoto)
|
||||
else if (!visible.albums()) lychee.goto(album.getID())
|
||||
|
||||
let params = {
|
||||
photoIDs: photoIDs.join(),
|
||||
albumID
|
||||
|
Loading…
Reference in New Issue
Block a user