makes smaller fetching batch
This commit is contained in:
@@ -24,13 +24,14 @@ angular.module('satbd.satellite.bar.views.recents',[
|
||||
});
|
||||
|
||||
$scope.loadMore = function() {
|
||||
var batchSize =20;
|
||||
$log.info('Loading more components');
|
||||
if (!$scope.scrollMore || $scope.albumIDs.length >= $scope.allAlbums.length) {
|
||||
$scope.scrollMore = false;
|
||||
$log.info('reached the end of albums')
|
||||
return;
|
||||
}
|
||||
var newSize = Math.min($scope.albumIDs.length + 50, $scope.allAlbums.length);
|
||||
var newSize = Math.min($scope.albumIDs.length + batchSize, $scope.allAlbums.length);
|
||||
for( var i = $scope.albumIDs.length; i < newSize; i++) {
|
||||
$scope.albumIDs.push($scope.allAlbums[i]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user