diff options
author | Stefan Malzner <stefan@adlk.io> | 2017-11-23 11:30:19 +0100 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2017-11-23 11:30:19 +0100 |
commit | 5573ab7e17400229dd5d79fa50808b38293872fc (patch) | |
tree | d1f933f081032a2bff4965033087f2ed2bfcecf9 /src/api | |
parent | test tweetdeck glitches (diff) | |
download | ferdium-app-5573ab7e17400229dd5d79fa50808b38293872fc.tar.gz ferdium-app-5573ab7e17400229dd5d79fa50808b38293872fc.tar.zst ferdium-app-5573ab7e17400229dd5d79fa50808b38293872fc.zip |
Add SettingsModel and fix issue with improper mobx data handling
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/server/LocalApi.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/api/server/LocalApi.js b/src/api/server/LocalApi.js index 79ac6e12f..eba236f16 100644 --- a/src/api/server/LocalApi.js +++ b/src/api/server/LocalApi.js | |||
@@ -1,3 +1,5 @@ | |||
1 | import SettingsModel from '../../models/Settings'; | ||
2 | |||
1 | export default class LocalApi { | 3 | export default class LocalApi { |
2 | // App | 4 | // App |
3 | async updateAppSettings(data) { | 5 | async updateAppSettings(data) { |
@@ -13,7 +15,7 @@ export default class LocalApi { | |||
13 | async getAppSettings() { | 15 | async getAppSettings() { |
14 | const settingsString = localStorage.getItem('app'); | 16 | const settingsString = localStorage.getItem('app'); |
15 | try { | 17 | try { |
16 | const settings = JSON.parse(settingsString) || {}; | 18 | const settings = new SettingsModel(JSON.parse(settingsString) || {}); |
17 | console.debug('LocalApi::getAppSettings resolves', settings); | 19 | console.debug('LocalApi::getAppSettings resolves', settings); |
18 | 20 | ||
19 | return settings; | 21 | return settings; |