diff --git a/js/glowingbear.js b/js/glowingbear.js index 08b4346..526c46f 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -283,6 +283,15 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', settings.password = ''; } + // Check if user decides to save password, and copy it over + settings.addCallback('savepassword', function(newvalue) { + if (settings.savepassword) { + // Init value in settings module + settings.setDefaults({'password': $scope.password}); + settings.password = $scope.password; + } + }); + $rootScope.wasMobileUi = false; if (utils.isMobileUi()) { $rootScope.wasMobileUi = true;