Split configuration into low and high traffic files

Also, we're now handling config ourselves instead of using
electron-config and config dependencies.
This commit is contained in:
Scott Nonnenberg 2018-08-28 14:53:05 -07:00
parent f59ec92fef
commit 998c35dcb3
9 changed files with 112 additions and 103 deletions

View file

@ -34,11 +34,15 @@
this.render();
try {
await Database.clear();
await Database.close();
window.log.info('All database connections closed. Starting delete.');
window.log.info(
'All database connections closed. Starting database drop.'
);
await Database.drop();
} catch (error) {
window.log.error(
'Something went wrong closing all database connections.'
'Something went wrong deleting IndexedDB data then dropping database.'
);
}
@ -46,15 +50,14 @@
},
async clearAllData() {
try {
await Promise.all([
Logs.deleteAll(),
Database.drop(),
window.Signal.Data.removeAll(),
window.Signal.Data.removeOtherData(),
]);
await Logs.deleteAll();
// SQLCipher
await window.Signal.Data.removeAll();
await window.Signal.Data.close();
await window.Signal.Data.removeDB();
await window.Signal.Data.removeOtherData();
} catch (error) {
window.log.error(
'Something went wrong deleting all data:',