From 9a89ef51cded72d5e6d378211e8a74964cfc8cc2 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Thu, 15 Feb 2018 17:38:13 +0100 Subject: Replace localAPI requests with mobx-localstorage --- src/api/server/LocalApi.js | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'src/api/server') diff --git a/src/api/server/LocalApi.js b/src/api/server/LocalApi.js index efbb42999..1988f713c 100644 --- a/src/api/server/LocalApi.js +++ b/src/api/server/LocalApi.js @@ -7,38 +7,6 @@ import { getServicePartitionsDirectory } from '../../helpers/service-helpers.js' const { session } = remote; export default class LocalApi { - // App - async updateAppSettings(data) { - const currentSettings = await this.getAppSettings(); - const settings = Object.assign(currentSettings, data); - - localStorage.setItem('app', JSON.stringify(settings)); - console.debug('LocalApi::updateAppSettings resolves', settings); - - return settings; - } - - async getAppSettings() { - const settingsString = localStorage.getItem('app'); - try { - const settings = JSON.parse(settingsString) || {}; - console.debug('LocalApi::getAppSettings resolves', settings); - - return settings; - } catch (err) { - return {}; - } - } - - async removeKey(key) { - const settings = await this.getAppSettings(); - - if (Object.hasOwnProperty.call(settings, key)) { - delete settings[key]; - localStorage.setItem('app', JSON.stringify(settings)); - } - } - // Services async getAppCacheSize() { const partitionsDir = getServicePartitionsDirectory(); -- cgit v1.2.3-54-g00ecf