1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

updates to icon component and state init

This commit is contained in:
Kyle Spearrin
2017-10-17 13:16:05 -04:00
parent 09c340bbe5
commit cebf913999
4 changed files with 35 additions and 33 deletions

View File

@@ -1,10 +1,16 @@
angular
.module('bit.services')
.factory('stateService', function () {
.factory('stateService', function (utilsService, constantsService) {
var _service = {},
_state = {};
_service.init = function () {
utilsService.getObjFromStorage(constantsService.disableFaviconKey).then(function (disabledFavicons) {
_service.saveState('faviconEnabled', !disabledFavicons);
});
};
_service.saveState = function (key, data) {
_state[key] = data;
};