summaryrefslogtreecommitdiffstats
path: root/js/app/services/persistence.coffee
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2013-12-20 23:25:00 +0100
committerBernhard Posselt <dev@bernhard-posselt.com>2013-12-20 23:25:00 +0100
commitc930b7c448fd394e9f12a82728f4fe4202879974 (patch)
treebd097b71a7f57407469850b0023265e1138339e1 /js/app/services/persistence.coffee
parent35316ec9331aa91087d6f695ed3935de2982416f (diff)
debug
Diffstat (limited to 'js/app/services/persistence.coffee')
-rw-r--r--js/app/services/persistence.coffee8
1 files changed, 5 insertions, 3 deletions
diff --git a/js/app/services/persistence.coffee b/js/app/services/persistence.coffee
index 9aba6c777..a79dc1224 100644
--- a/js/app/services/persistence.coffee
+++ b/js/app/services/persistence.coffee
@@ -70,7 +70,6 @@ $rootScope, $q) ->
# autopage prevention
@_lastFeedChange = new Date().getTime()
@_preventUselessAutoPageRequest = false
- console.log 'free'
else
loading = @_autoPageLoading
@@ -87,7 +86,6 @@ $rootScope, $q) ->
lastChange == @_lastFeedChange &&
offset != 0
@_preventUselessAutoPageRequest = true
- console.log 'lock'
onSuccess(data)
loading.decrease()
failureCallbackWrapper = (data) ->
@@ -103,10 +101,14 @@ $rootScope, $q) ->
onFailure: failureCallbackWrapper
if not @_preventUselessAutoPageRequest
- console.log 'request'
@_request.get 'news_items', params
else
+ # this case happens if an autopage request is prevented if when
+ # there are no new items. we still have to remove the loading
+ # sign and call the success handler, otherwise the controller
+ # will block the request and the loading sign will not go away
onSuccess()
+ loading.decrease()
getNewItems: (type, id, lastModified, onSuccess) ->