diff --git a/app/assets/javascripts/app/lib/app_post/collection.coffee b/app/assets/javascripts/app/lib/app_post/collection.coffee index 815ba5734..189d94695 100644 --- a/app/assets/javascripts/app/lib/app_post/collection.coffee +++ b/app/assets/javascripts/app/lib/app_post/collection.coffee @@ -110,19 +110,18 @@ class _collectionSingleton extends Spine.Module # check if new object is newer, just load newer objects if object.updated_at currentUpdatedAt = appObject.updatedAt(key) - objectToLoad = undefined if currentUpdatedAt if currentUpdatedAt < object.updated_at - objectToLoad = object - @log 'debug', 'refresh newer', params.type, key + if params.later + listToRefreshLater.push object + @log 'debug', 'refresh newer later', params.type, key + else + listToRefresh.push object + @log 'debug', 'refresh newer', params.type, key + else - objectToLoad = object - @log 'debug', 'refresh try no updated_at', params.type, key - if objectToLoad - if params.later - listToRefreshLater.push objectToLoad - else - listToRefresh.push object + listToRefresh.push object + @log 'debug', 'refresh new no current updated_at', params.type, key else listToRefresh.push object @log 'debug', 'refresh new', params.type, key