mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-09 06:04:33 +08:00
[client-app] Remove unecessary db setup for mail rules
Summary: This shaves off ~150ms trying to issue this query Test Plan: manual Reviewers: evan, spang, mark Reviewed By: mark Differential Revision: https://phab.nylas.com/D4317
This commit is contained in:
parent
7e0194e6c3
commit
be237d076e
1 changed files with 0 additions and 11 deletions
|
@ -212,17 +212,6 @@ class DatabaseStore extends NylasStore {
|
|||
}
|
||||
|
||||
this._db.pragma(`user_version=${DatabaseVersion}`);
|
||||
|
||||
const exportPath = path.join(NylasEnv.getConfigDirPath(), 'mail-rules-export.json')
|
||||
if (fs.existsSync(exportPath)) {
|
||||
try {
|
||||
const row = JSON.parse(fs.readFileSync(exportPath));
|
||||
this.inTransaction(t => t.persistJSONBlob('MailRules-V2', row.json));
|
||||
fs.unlink(exportPath);
|
||||
} catch (mailRulesError) {
|
||||
console.log(`Could not re-import mail rules: ${mailRulesError}`);
|
||||
}
|
||||
}
|
||||
return ready();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue