From 4a73bff3eef833a5cb500dc178bbeeb41b5ca56e Mon Sep 17 00:00:00 2001 From: Athou Date: Mon, 6 May 2013 16:09:15 +0200 Subject: [PATCH] different loading limit based on view mode --- src/main/webapp/js/controllers.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/js/controllers.js b/src/main/webapp/js/controllers.js index 01a3eb76..c5ec10fc 100644 --- a/src/main/webapp/js/controllers.js +++ b/src/main/webapp/js/controllers.js @@ -464,7 +464,7 @@ function($scope, $stateParams, $http, $route, $window, EntryService, SettingsSer } }); - $scope.limit = 10; + $scope.limit = SettingsService.settings.viewMode == 'title' ? 10 : 3; $scope.busy = false; $scope.hasMore = true; @@ -478,8 +478,13 @@ function($scope, $stateParams, $http, $route, $window, EntryService, SettingsSer var limit = $scope.limit; if ($scope.entries.length === 0) { $window = angular.element($window); - limit = $window.height() / 33; - limit = parseInt(limit, 10) + 5; + if (SettingsService.settings.viewMode == 'title') { + limit = $window.height() / 33; + limit = parseInt(limit, 10) + 5; + } else { + limit = $window.height() / 97; + limit = parseInt(limit, 10) + 1; + } } var callback = function(data) {