Fix #4 - Do not trigger loading if mode='loading'

Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
James Ketr 2018-09-30 18:01:04 -07:00
parent 4b8b5bb2fe
commit e777d6b5d4

View File

@ -660,10 +660,8 @@
console.log("Mode changed to " + mode); console.log("Mode changed to " + mode);
this.path = ""; this.path = "";
this.resetPhotos(); this.resetPhotos();
if (mode != "login" && mode != "loading") { this._loadAlbums();
this._loadAlbums(); this._loadPhotos();
this._loadPhotos();
}
}, },
breadcrumb: function(path) { breadcrumb: function(path) {
@ -1097,7 +1095,11 @@
}, },
_loadPhotos: function(start, append, limit) { _loadPhotos: function(start, append, limit) {
if (this.loading == true || this.mode == "login") { if (mode == "login" || mode == "loading") {
return;
}
if (this.loading == true) {
return; return;
} }
this.loading = true; this.loading = true;
@ -1186,7 +1188,11 @@
}, },
_loadAlbums: function() { _loadAlbums: function() {
if (this.loadingAlbums == true || this.mode == "login") { if (mode == "login" || mode == "loading") {
return;
}
if (this.loadingAlbums == true) {
return; return;
} }
this.loadingAlbums = true; this.loadingAlbums = true;