diff options
author | 2018-03-28 10:44:43 +0200 | |
---|---|---|
committer | 2018-03-28 10:44:43 +0200 | |
commit | de06f275bc0ba6ddbe7627895efc3f8827bb6880 (patch) | |
tree | adfc31056eb3d86a8c8ebaa3a11976a9cee5433f /src | |
parent | Replace share settings with webviews autorun with single key reaction (diff) | |
download | ferdium-app-de06f275bc0ba6ddbe7627895efc3f8827bb6880.tar.gz ferdium-app-de06f275bc0ba6ddbe7627895efc3f8827bb6880.tar.zst ferdium-app-de06f275bc0ba6ddbe7627895efc3f8827bb6880.zip |
Don't repeat yourself
Diffstat (limited to 'src')
-rw-r--r-- | src/electron/Settings.js | 13 | ||||
-rw-r--r-- | src/models/Settings.js | 14 |
2 files changed, 2 insertions, 25 deletions
diff --git a/src/electron/Settings.js b/src/electron/Settings.js index e24aefdbb..b3138e948 100644 --- a/src/electron/Settings.js +++ b/src/electron/Settings.js | |||
@@ -6,18 +6,7 @@ import { SETTINGS_PATH, DEFAULT_APP_SETTINGS } from '../config'; | |||
6 | const debug = require('debug')('Settings'); | 6 | const debug = require('debug')('Settings'); |
7 | 7 | ||
8 | export default class Settings { | 8 | export default class Settings { |
9 | @observable store = { | 9 | @observable store = DEFAULT_APP_SETTINGS; |
10 | autoLaunchInBackground: DEFAULT_APP_SETTINGS.autoLaunchInBackground, | ||
11 | runInBackground: DEFAULT_APP_SETTINGS.runInBackground, | ||
12 | enableSystemTray: DEFAULT_APP_SETTINGS.enableSystemTray, | ||
13 | minimizeToSystemTray: DEFAULT_APP_SETTINGS.minimizeToSystemTray, | ||
14 | locale: DEFAULT_APP_SETTINGS.locale, | ||
15 | beta: DEFAULT_APP_SETTINGS.beta, | ||
16 | isAppMuted: DEFAULT_APP_SETTINGS.isAppMuted, | ||
17 | showMessageBadgeWhenMuted: DEFAULT_APP_SETTINGS.showMessageBadgeWhenMuted, | ||
18 | showDisabledServices: DEFAULT_APP_SETTINGS.showDisabledServices, | ||
19 | enableSpellchecking: DEFAULT_APP_SETTINGS.enableSpellchecking, | ||
20 | }; | ||
21 | 10 | ||
22 | constructor() { | 11 | constructor() { |
23 | if (!pathExistsSync(SETTINGS_PATH)) { | 12 | if (!pathExistsSync(SETTINGS_PATH)) { |
diff --git a/src/models/Settings.js b/src/models/Settings.js index 6b41b5d95..942232d12 100644 --- a/src/models/Settings.js +++ b/src/models/Settings.js | |||
@@ -2,19 +2,7 @@ import { observable, extendObservable } from 'mobx'; | |||
2 | import { DEFAULT_APP_SETTINGS } from '../config'; | 2 | import { DEFAULT_APP_SETTINGS } from '../config'; |
3 | 3 | ||
4 | export default class Settings { | 4 | export default class Settings { |
5 | @observable app = { | 5 | @observable app = DEFAULT_APP_SETTINGS |
6 | autoLaunchInBackground: DEFAULT_APP_SETTINGS.autoLaunchInBackground, | ||
7 | runInBackground: DEFAULT_APP_SETTINGS.runInBackground, | ||
8 | enableSystemTray: DEFAULT_APP_SETTINGS.enableSystemTray, | ||
9 | minimizeToSystemTray: DEFAULT_APP_SETTINGS.minimizeToSystemTray, | ||
10 | isAppMuted: DEFAULT_APP_SETTINGS.isAppMuted, | ||
11 | showMessageBadgeWhenMuted: DEFAULT_APP_SETTINGS.showMessageBadgeWhenMuted, | ||
12 | showDisabledServices: DEFAULT_APP_SETTINGS.showDisabledServices, | ||
13 | enableSpellchecking: DEFAULT_APP_SETTINGS.enableSpellchecking, | ||
14 | locale: DEFAULT_APP_SETTINGS.locale, | ||
15 | beta: DEFAULT_APP_SETTINGS.beta, | ||
16 | |||
17 | } | ||
18 | 6 | ||
19 | @observable service = { | 7 | @observable service = { |
20 | activeService: DEFAULT_APP_SETTINGS.autoLaunchInBackground, | 8 | activeService: DEFAULT_APP_SETTINGS.autoLaunchInBackground, |