Reset albums and paths on mode and user change
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
4b3f484a89
commit
626295c94c
@ -558,6 +558,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
resetPhotos: function() {
|
resetPhotos: function() {
|
||||||
|
this.albums = [];
|
||||||
this.years = [];
|
this.years = [];
|
||||||
this.notifyPath("years.length");
|
this.notifyPath("years.length");
|
||||||
this.pendingPhotos = [];
|
this.pendingPhotos = [];
|
||||||
@ -581,6 +582,7 @@
|
|||||||
console.log("Mode changed to " + mode);
|
console.log("Mode changed to " + mode);
|
||||||
this.path = "";
|
this.path = "";
|
||||||
this.resetPhotos();
|
this.resetPhotos();
|
||||||
|
this._loadAlbums();
|
||||||
this._loadPhotos();
|
this._loadPhotos();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1146,6 +1148,7 @@
|
|||||||
|
|
||||||
userChanged: function(user) {
|
userChanged: function(user) {
|
||||||
this.resetPhotos();
|
this.resetPhotos();
|
||||||
|
this.path = "";
|
||||||
if (user) {
|
if (user) {
|
||||||
this.mode = "memories";
|
this.mode = "memories";
|
||||||
this._loadAlbums();
|
this._loadAlbums();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user