From e777d6b5d4a8921c0329c3cf974e02f52153b07d Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Sun, 30 Sep 2018 18:01:04 -0700 Subject: [PATCH] Fix #4 - Do not trigger loading if mode='loading' Signed-off-by: James Ketrenos --- frontend/src/ketr-photos/ketr-photos.html | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/frontend/src/ketr-photos/ketr-photos.html b/frontend/src/ketr-photos/ketr-photos.html index 00a43fc..e58b764 100755 --- a/frontend/src/ketr-photos/ketr-photos.html +++ b/frontend/src/ketr-photos/ketr-photos.html @@ -660,10 +660,8 @@ console.log("Mode changed to " + mode); this.path = ""; this.resetPhotos(); - if (mode != "login" && mode != "loading") { - this._loadAlbums(); - this._loadPhotos(); - } + this._loadAlbums(); + this._loadPhotos(); }, breadcrumb: function(path) { @@ -1097,7 +1095,11 @@ }, _loadPhotos: function(start, append, limit) { - if (this.loading == true || this.mode == "login") { + if (mode == "login" || mode == "loading") { + return; + } + + if (this.loading == true) { return; } this.loading = true; @@ -1186,7 +1188,11 @@ }, _loadAlbums: function() { - if (this.loadingAlbums == true || this.mode == "login") { + if (mode == "login" || mode == "loading") { + return; + } + + if (this.loadingAlbums == true) { return; } this.loadingAlbums = true;