Fixed several caching issues
This commit is contained in:
parent
fe52b09694
commit
6caffe004b
@ -146,6 +146,8 @@ photo = {
|
||||
if (!photoIDs) return false;
|
||||
if (photoIDs instanceof Array===false) photoIDs = [photoIDs];
|
||||
|
||||
albums.refresh();
|
||||
|
||||
params = "duplicatePhoto&photoIDs=" + photoIDs;
|
||||
lychee.api(params, function(data) {
|
||||
|
||||
@ -154,8 +156,6 @@ photo = {
|
||||
|
||||
});
|
||||
|
||||
albums.refresh();
|
||||
|
||||
},
|
||||
|
||||
delete: function(photoIDs) {
|
||||
@ -201,6 +201,8 @@ photo = {
|
||||
// Only when search is not active
|
||||
if (!visible.albums()) lychee.goto(album.getID());
|
||||
|
||||
albums.refresh();
|
||||
|
||||
params = "deletePhoto&photoIDs=" + photoIDs;
|
||||
lychee.api(params, function(data) {
|
||||
|
||||
@ -208,8 +210,6 @@ photo = {
|
||||
|
||||
});
|
||||
|
||||
albums.refresh();
|
||||
|
||||
}],
|
||||
["", function() {}]
|
||||
];
|
||||
@ -312,6 +312,8 @@ photo = {
|
||||
|
||||
});
|
||||
|
||||
albums.refresh();
|
||||
|
||||
params = "setPhotoAlbum&photoIDs=" + photoIDs + "&albumID=" + albumID;
|
||||
lychee.api(params, function(data) {
|
||||
|
||||
@ -336,6 +338,8 @@ photo = {
|
||||
view.album.content.star(id);
|
||||
});
|
||||
|
||||
albums.refresh();
|
||||
|
||||
params = "setPhotoStar&photoIDs=" + photoIDs;
|
||||
lychee.api(params, function(data) {
|
||||
|
||||
@ -343,8 +347,6 @@ photo = {
|
||||
|
||||
});
|
||||
|
||||
albums.refresh();
|
||||
|
||||
},
|
||||
|
||||
setPublic: function(photoID, e) {
|
||||
@ -369,6 +371,8 @@ photo = {
|
||||
album.json.content[photoID].public = (album.json.content[photoID].public==0) ? 1 : 0;
|
||||
view.album.content.public(photoID);
|
||||
|
||||
albums.refresh();
|
||||
|
||||
params = "setPhotoPublic&photoID=" + photoID;
|
||||
lychee.api(params, function(data) {
|
||||
|
||||
@ -376,8 +380,6 @@ photo = {
|
||||
|
||||
});
|
||||
|
||||
albums.refresh();
|
||||
|
||||
},
|
||||
|
||||
setDescription: function(photoID) {
|
||||
|
@ -215,6 +215,8 @@ var settings = {
|
||||
sorting[0] = $("select#settings_type").val();
|
||||
sorting[1] = $("select#settings_order").val();
|
||||
|
||||
albums.refresh();
|
||||
|
||||
params = "setSorting&type=" + sorting[0] + "&order=" + sorting[1];
|
||||
lychee.api(params, function(data) {
|
||||
|
||||
|
@ -65,6 +65,8 @@ upload = {
|
||||
|
||||
}
|
||||
|
||||
albums.refresh();
|
||||
|
||||
if (album.getID()===false) lychee.goto("0");
|
||||
else album.load(albumID);
|
||||
|
||||
@ -259,6 +261,8 @@ upload = {
|
||||
upload.close();
|
||||
upload.notify("Import complete");
|
||||
|
||||
albums.refresh();
|
||||
|
||||
if (album.getID()===false) lychee.goto("0");
|
||||
else album.load(albumID);
|
||||
|
||||
@ -306,6 +310,8 @@ upload = {
|
||||
upload.close();
|
||||
upload.notify("Import complete");
|
||||
|
||||
albums.refresh();
|
||||
|
||||
if (data==="Notice: Import only contains albums!") {
|
||||
if (visible.albums()) lychee.load();
|
||||
else lychee.goto("");
|
||||
@ -365,6 +371,8 @@ upload = {
|
||||
upload.close();
|
||||
upload.notify("Import complete");
|
||||
|
||||
albums.refresh();
|
||||
|
||||
if (album.getID()===false) lychee.goto("0");
|
||||
else album.load(albumID);
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user