calculate offset correctly for tags and starred listing (fix #530)

This commit is contained in:
Athou
2013-12-05 12:25:17 +01:00
parent 1d73982545
commit b52c459ebb

View File

@@ -724,7 +724,10 @@ module.controller('FeedListCtrl', [
$scope.busy = true;
var limit = $scope.limit;
var offset = SettingsService.settings.readingMode == 'all' ? $scope.entries.length : _.where($scope.entries, {
var read_shown = SettingsService.settings.readingMode === 'all' || $scope.selectedType === 'tag'
|| ($scope.selectedType === 'category' && $scope.selectedId === 'starred');
var offset = read_shown ? $scope.entries.length : _.where($scope.entries, {
read : false
}).length;
if ($scope.entries.length === 0) {