From 8b9c1786b3dc67e573afc71fbce9873d7c5097ff Mon Sep 17 00:00:00 2001 From: Athou Date: Wed, 3 Apr 2013 13:56:18 +0200 Subject: [PATCH] save readingmode when changed --- src/main/webapp/js/directives.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/webapp/js/directives.js b/src/main/webapp/js/directives.js index 8613ee9e..ed029750 100644 --- a/src/main/webapp/js/directives.js +++ b/src/main/webapp/js/directives.js @@ -194,6 +194,12 @@ module.directive('toolbar', function($state, $stateParams, $route, $location, }); $scope.settingsService = SettingsService; + $scope.$watch('settingsService.settings.readingMode', function(newValue, + oldValue) { + if (newValue && oldValue && newValue != oldValue) { + SettingsService.save(); + } + }); $scope.refresh = function() { $scope.$emit('emitReload'); };