in unread mode, use the actual number of unread items as offset instead of the size of the list of items (#462)

This commit is contained in:
Athou
2013-08-03 16:31:48 +02:00
parent 4664bef4d8
commit f36471bbf3

View File

@@ -709,6 +709,9 @@ module.controller('FeedListCtrl', [
$scope.busy = true;
var limit = $scope.limit;
var offset = SettingsService.settings.readingMode == 'all' ? $scope.entries.length : _.where($scope.entries, {
read : false
}).length;
if ($scope.entries.length === 0) {
$window = angular.element($window);
if (SettingsService.settings.viewMode == 'title') {
@@ -741,7 +744,7 @@ module.controller('FeedListCtrl', [
id : $scope.selectedId,
readType : $scope.settingsService.settings.readingMode,
order : $scope.settingsService.settings.readingOrder,
offset : $scope.entries.length,
offset : offset,
limit : limit
}, callback);
} else {