Skip to content

Commit a28c456

Browse files
committed
set isLoading before fetch
1 parent 9bf7298 commit a28c456

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ui-scroll.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,8 @@ angular.module('ui.scroll', [])
305305
if (!updates || buffer.effectiveHeight(updates.inserted) > 0) {
306306
// this means that at least one item appended in the last batch has height > 0
307307
if (pending.push(true) === 1) {
308-
fetch(rid);
309308
adapter.loading(true);
309+
fetch(rid);
310310
}
311311
}
312312
} else if (viewport.shouldLoadTop()) {
@@ -315,8 +315,8 @@ angular.module('ui.scroll', [])
315315
// pending[0] = true means that previous fetch was appending. We need to force at least one prepend
316316
// BTW there will always be at least 1 element in the pending array because bottom is fetched first
317317
if (pending.push(false) === 1) {
318-
fetch(rid);
319318
adapter.loading(true);
319+
fetch(rid);
320320
}
321321
}
322322
}

0 commit comments

Comments
 (0)