When deleting picture from album show next picture #242
This commit is contained in:
parent
c0d2f4b5b8
commit
263eed3447
BIN
dist/main.js
vendored
BIN
dist/main.js
vendored
Binary file not shown.
@ -53,7 +53,7 @@ photo = {
|
||||
|
||||
},
|
||||
|
||||
//preload the next photo for better response time
|
||||
// Preload the next photo for better response time
|
||||
preloadNext: function(photoID) {
|
||||
|
||||
var nextPhoto,
|
||||
@ -185,8 +185,8 @@ photo = {
|
||||
buttons = [
|
||||
["", function() {
|
||||
|
||||
var nextPhoto,
|
||||
previousPhoto;
|
||||
var nextPhoto = "",
|
||||
previousPhoto = "";
|
||||
|
||||
photoIDs.forEach(function(id, index, array) {
|
||||
|
||||
@ -206,11 +206,13 @@ photo = {
|
||||
|
||||
});
|
||||
|
||||
// Only when search is not active
|
||||
if (!visible.albums()) lychee.goto(album.getID());
|
||||
|
||||
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!==""&&nextPhoto!==photo.getID()) lychee.goto(album.getID() + "/" + nextPhoto);
|
||||
else if (!visible.albums()) lychee.goto(album.getID());
|
||||
|
||||
params = "deletePhoto&photoIDs=" + photoIDs;
|
||||
lychee.api(params, function(data) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user