{"action":"closed","issue":{"url":"https://api.github.com/repos/brave/browser-laptop/issues/3544","repository_url":"https://api.github.com/repos/brave/browser-laptop","labels_url":"https://api.github.com/repos/brave/browser-laptop/issues/3544/labels{/name}","comments_url":"https://api.github.com/repos/brave/browser-laptop/issues/3544/comments","events_url":"https://api.github.com/repos/brave/browser-laptop/issues/3544/events","html_url":"https://github.com/brave/browser-laptop/issues/3544","id":173893318,"number":3544,"title":"Refactor the getSettings code to allow for dynamic default values","user":{"login":"bsclifton","id":4733304,"avatar_url":"https://avatars.githubusercontent.com/u/4733304?v=3","gravatar_id":"","url":"https://api.github.com/users/bsclifton","html_url":"https://github.com/bsclifton","followers_url":"https://api.github.com/users/bsclifton/followers","following_url":"https://api.github.com/users/bsclifton/following{/other_user}","gists_url":"https://api.github.com/users/bsclifton/gists{/gist_id}","starred_url":"https://api.github.com/users/bsclifton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsclifton/subscriptions","organizations_url":"https://api.github.com/users/bsclifton/orgs","repos_url":"https://api.github.com/users/bsclifton/repos","events_url":"https://api.github.com/users/bsclifton/events{/privacy}","received_events_url":"https://api.github.com/users/bsclifton/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/brave/browser-laptop/labels/refactoring","name":"refactoring","color":"0052cc"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-29T23:04:10Z","updated_at":"2016-10-17T18:47:09Z","closed_at":"2016-10-17T18:47:09Z","body":"For reference, see https://github.com/brave/browser-laptop/blob/af4e7df7df9d78a0d1190b5369bbd9c002c62616/js/settings.js#L40\r\n\r\nThe code currently has a special hard-coded case for `settingKey === settings.ACTIVE_PASSWORD_MANAGER`. Instead of having an if statement (which executes for every call) this could be reworked to have a default value determined in resolveValue().  The code is already lookup up static values using the format `config.settings[key]` but currently doesn't have a mechanism for handling more dynamic values, like the logic found in passwordManagerDefault().\r\n\r\ncc: @BrendanEich "}}
{"actor":{"display_login":"bsclifton"}}