Reset albums and paths on mode and user change

Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
James Ketr 2018-09-16 21:17:33 -07:00
parent 4b3f484a89
commit 626295c94c

View File

@ -558,6 +558,7 @@
},
resetPhotos: function() {
this.albums = [];
this.years = [];
this.notifyPath("years.length");
this.pendingPhotos = [];
@ -581,6 +582,7 @@
console.log("Mode changed to " + mode);
this.path = "";
this.resetPhotos();
this._loadAlbums();
this._loadPhotos();
},
@ -1146,6 +1148,7 @@
userChanged: function(user) {
this.resetPhotos();
this.path = "";
if (user) {
this.mode = "memories";
this._loadAlbums();