diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-05-06 11:50:50 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-05-06 11:50:50 +0200 |
commit | 5981406dc05e7043bcccfad19a3da126b8bc1c0c (patch) | |
tree | 11237fe865353ff3f6d71fa81daf633adf559d37 /js/public/app.js | |
parent | 17356ec05fdc19725689d6475b6443f1b3dbd24a (diff) |
dont show loading sign when updating feeds and folders, fix #153
Diffstat (limited to 'js/public/app.js')
-rw-r--r-- | js/public/app.js | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/js/public/app.js b/js/public/app.js index d71e77cbe..ced24417e 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -51,8 +51,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. 'Persistence', 'Config', function(Persistence, Config) { Persistence.init(); return setInterval(function() { - Persistence.getAllFeeds(); - return Persistence.getAllFolders(); + Persistence.getAllFeeds(null, false); + return Persistence.getAllFolders(null, false); }, Config.feedUpdateInterval); } ]); @@ -2682,19 +2682,29 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. */ - Persistence.prototype.getAllFolders = function(onSuccess) { + Persistence.prototype.getAllFolders = function(onSuccess, showLoading) { var failureCallbackWrapper, params, successCallbackWrapper, _this = this; + if (showLoading == null) { + showLoading = true; + } onSuccess || (onSuccess = function() {}); - this._feedLoading.increase(); - successCallbackWrapper = function(data) { - onSuccess(); - return _this._feedLoading.decrease(); - }; - failureCallbackWrapper = function(data) { - return _this._feedLoading.decrease(); - }; + if (showLoading) { + this._feedLoading.increase(); + successCallbackWrapper = function(data) { + onSuccess(); + return _this._feedLoading.decrease(); + }; + failureCallbackWrapper = function(data) { + return _this._feedLoading.decrease(); + }; + } else { + successCallbackWrapper = function(data) { + return onSuccess(); + }; + failureCallbackWrapper = function(data) {}; + } params = { onSuccess: successCallbackWrapper, onFailure: failureCallbackWrapper |