diff --git a/src/popup/app/vault/vaultController.js b/src/popup/app/vault/vaultController.js index 543544546b..538b8b19bb 100644 --- a/src/popup/app/vault/vaultController.js +++ b/src/popup/app/vault/vaultController.js @@ -7,6 +7,8 @@ state = stateService.getState(stateKey) || {}; $scope.i18n = i18nService; + $scope.showFolderCounts = !utilsService.isEdge(); + $scope.disableSearch = utilsService.isEdge(); $('#search').focus(); var syncOnLoad = $stateParams.syncOnLoad; @@ -60,16 +62,18 @@ $rootScope.vaultFolders = decFolders; $rootScope.vaultLogins = decLogins; - // compute item count for each folder - for (var i = 0; i < decFolders.length; i++) { - var itemCount = 0; - for (var j = 0; j < decLogins.length; j++) { - if (decLogins[j].folderId === decFolders[i].id) { - itemCount++; + if ($scope.showFolderCounts) { + // compute item count for each folder + for (var i = 0; i < decFolders.length; i++) { + var itemCount = 0; + for (var j = 0; j < decLogins.length; j++) { + if (decLogins[j].folderId === decFolders[i].id) { + itemCount++; + } } - } - $rootScope.vaultFolders[i].itemCount = itemCount; + $rootScope.vaultFolders[i].itemCount = itemCount; + } } if (!delayLoad) { diff --git a/src/popup/app/vault/vaultViewFolderController.js b/src/popup/app/vault/vaultViewFolderController.js index 47b776b97e..438570191b 100644 --- a/src/popup/app/vault/vaultViewFolderController.js +++ b/src/popup/app/vault/vaultViewFolderController.js @@ -2,7 +2,7 @@ .module('bit.vault') .controller('vaultViewFolderController', function ($scope, loginService, folderService, $q, $state, $stateParams, toastr, - syncService, $analytics, i18nService, stateService) { + syncService, $analytics, i18nService, stateService, utilsService) { var stateKey = 'viewFolder', state = stateService.getState(stateKey) || {}; @@ -41,7 +41,13 @@ var loginPromise = $q.when(loginService.getAllDecryptedForFolder($scope.folder.id)); loginPromise.then(function (logins) { - decLogins = logins.sort(loginSort); + if (utilsService.isEdge()) { + // Edge is super slow at sorting + decLogins = logins; + } + else { + decLogins = logins.sort(loginSort); + } }); promises.push(loginPromise); diff --git a/src/popup/app/vault/views/vault.html b/src/popup/app/vault/views/vault.html index 403a963c82..dc450146df 100644 --- a/src/popup/app/vault/views/vault.html +++ b/src/popup/app/vault/views/vault.html @@ -3,7 +3,7 @@