Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/passman.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorfnuesse <felix.nuesse@t-online.de>2018-12-06 02:07:01 +0300
committerfnuesse <felix.nuesse@t-online.de>2018-12-06 02:07:01 +0300
commit9485ccbd975e8f175e296edbcc039572d728ff81 (patch)
tree5377d1f9d189e54a6b902b4fc49f9cbfd3c9a089 /js
parent5ef8c51548f75a546c39d0c40f0c1ea4c5c9390c (diff)
limit initializeNavbar calls to one time per controllerinstance
Signed-off-by: fnuesse <felix.nuesse@t-online.de>
Diffstat (limited to 'js')
-rw-r--r--js/app/controllers/menu.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/js/app/controllers/menu.js b/js/app/controllers/menu.js
index 36844df3..1506bd1a 100644
--- a/js/app/controllers/menu.js
+++ b/js/app/controllers/menu.js
@@ -193,18 +193,23 @@
});
};
-
-
$scope.legacyNavbarDefault=true;
+ $scope.legacyNavbarAlreadyInitialized=false;
+
if (typeof $scope.legacyNavbar === 'undefined') {
$scope.legacyNavbar = $scope.legacyNavbarDefault;
}
+
$scope.$watch('legacyNavbar', function(newValue, oldValue) {
VaultService.setVaultSetting("vaultNavBarLegacy",newValue);
});
$scope.initializeNavbar = function () {
+ if($scope.legacyNavbarAlreadyInitialized){
+ return;
+ }
$scope.legacyNavbar = VaultService.getVaultSetting('vaultNavBarLegacy',$scope.legacyNavbarDefault);
+ $scope.legacyNavbarAlreadyInitialized=true;
};
$rootScope.$on('credentials_loaded', function () {