This commit is contained in:
Bernhard Posselt 2013-12-20 23:02:29 +01:00
Родитель 0dbcbb6f8b
Коммит 13f9849a68
3 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -84,11 +84,11 @@ $rootScope, $q) ->
do (lastChange, offset) =>
successCallbackWrapper = (data) =>
console.log data
console.log data.items
console.log data.data.items
console.log offset
console.log lastChange
console.log @_lastFeedChange
if data.items.length == 0 &&
if data.data.items.length == 0 &&
lastChange == @_lastFeedChange &&
offset != 0
@_preventUselessAutoPageRequest = true

Просмотреть файл

@ -2786,11 +2786,11 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
(function(lastChange, offset) {
return successCallbackWrapper = function(data) {
console.log(data);
console.log(data.items);
console.log(data.data.items);
console.log(offset);
console.log(lastChange);
console.log(_this._lastFeedChange);
if (data.items.length === 0 && lastChange === _this._lastFeedChange && offset !== 0) {
if (data.data.items.length === 0 && lastChange === _this._lastFeedChange && offset !== 0) {
_this._preventUselessAutoPageRequest = true;
}
onSuccess(data);

Просмотреть файл

@ -76,7 +76,8 @@ describe 'Persistence', ->
it 'should reset the autopage lock when loading a new feed', =>
data =
items: []
data:
items: []
called = 0
@req.get.andCallFake (route, params) ->
params.onSuccess(data)
@ -93,7 +94,8 @@ describe 'Persistence', ->
xit 'should not send autopage request if reqeust returned nothing', =>
data =
items: []
data:
items: []
called = 0
@req.get.andCallFake (route, params) ->
params.onSuccess(data)