From 32e136f5ec7cbbf6838832513ca25a50244cfa74 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sun, 6 Sep 2020 15:26:32 -0400 Subject: #963 handle no thumbs --- www/js/EventCtrl.js | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'www/js') diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index acb01b3e..8237f026 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -196,20 +196,26 @@ angular.module('zmApp.controllers') $scope.$on('$ionicView.beforeEnter', function () { - var ld = NVR.getLogin(); - if (ld.eventViewThumbsSize == 'large') { - NVR.debug ('Switching to big thumbs style'); - $scope.thumbClass = 'large'; - $scope.rowHeightRegular = 450; - $scope.rowHeightExpanded = $scope.rowHeightRegular + 230; + if (ld.eventViewThumbs != 'none') { + if (ld.eventViewThumbsSize == 'large') { + NVR.debug ('Switching to big thumbs style'); + $scope.thumbClass = 'large'; + $scope.rowHeightRegular = 450; + $scope.rowHeightExpanded = $scope.rowHeightRegular + 230; + } else { + NVR.debug ('using small thumbs style'); + $scope.thumbClass = 'small'; + $scope.rowHeightRegular = 250; + $scope.rowHeightExpanded = $scope.rowHeightRegular + 200; + + } } else { - NVR.debug ('using small thumbs style'); - $scope.thumbClass = 'small'; - $scope.rowHeightRegular = 250; - $scope.rowHeightExpanded = $scope.rowHeightRegular + 200; - + NVR.debug ('No thumbs'); + $scope.rowHeightRegular = 170; + $scope.rowHeightExpanded = $scope.rowHeightRegular + 200; } + $scope.rowHeight = $scope.rowHeightRegular; $scope.mid = ''; -- cgit v1.2.3