diff --git a/internal_packages/preferences/lib/tabs/preferences-general.jsx b/internal_packages/preferences/lib/tabs/preferences-general.jsx index 65367ee0c..877232580 100644 --- a/internal_packages/preferences/lib/tabs/preferences-general.jsx +++ b/internal_packages/preferences/lib/tabs/preferences-general.jsx @@ -1,7 +1,7 @@ /* eslint global-require: 0*/ import React from 'react'; -import fs from 'fs'; +import {Actions} from 'nylas-exports' import ConfigSchemaItem from './config-schema-item'; import WorkspaceSection from './workspace-section'; import SendingSection from './sending-section'; @@ -32,14 +32,9 @@ class PreferencesGeneral extends React.Component { } _resetEmailCache = () => { - const dataPath = `${NylasEnv.getConfigDirPath()}/edgehill.db` - fs.unlink(dataPath, (err) => { - if (err) console.log(err) - else this._reboot() - }) + Actions.resetEmailCache() } - render() { return (
diff --git a/src/K2 b/src/K2 index da61c6533..f141b7253 160000 --- a/src/K2 +++ b/src/K2 @@ -1 +1 @@ -Subproject commit da61c6533410534caa6ec7a2a401905795e6b0e0 +Subproject commit f141b7253a66d966c043bf0c33539ad2c1e8d308 diff --git a/src/flux/actions.es6 b/src/flux/actions.es6 index 4f7e1665d..871e4495e 100644 --- a/src/flux/actions.es6 +++ b/src/flux/actions.es6 @@ -564,6 +564,8 @@ class Actions { static refreshAllSyncWorkers = ActionScopeGlobal; static expandInitialSyncState = ActionScopeWindow; + + static resetEmailCache = ActionScopeGlobal; }