Move all remaining stores to SQLCipher
This commit is contained in:
parent
7aa9031c7f
commit
1755e0adfd
25 changed files with 2464 additions and 2047 deletions
|
@ -8,7 +8,6 @@
|
|||
'use strict';
|
||||
|
||||
window.Whisper = window.Whisper || {};
|
||||
const { Database } = window.Whisper;
|
||||
const { Logs } = window.Signal;
|
||||
|
||||
const CLEAR_DATA_STEPS = {
|
||||
|
@ -33,26 +32,12 @@
|
|||
this.step = CLEAR_DATA_STEPS.DELETING;
|
||||
this.render();
|
||||
|
||||
try {
|
||||
await Database.clear();
|
||||
await Database.close();
|
||||
window.log.info(
|
||||
'All database connections closed. Starting database drop.'
|
||||
);
|
||||
await Database.drop();
|
||||
} catch (error) {
|
||||
window.log.error(
|
||||
'Something went wrong deleting IndexedDB data then dropping database.'
|
||||
);
|
||||
}
|
||||
|
||||
this.clearAllData();
|
||||
await this.clearAllData();
|
||||
},
|
||||
async clearAllData() {
|
||||
try {
|
||||
await Logs.deleteAll();
|
||||
|
||||
// SQLCipher
|
||||
await window.Signal.Data.removeAll();
|
||||
await window.Signal.Data.close();
|
||||
await window.Signal.Data.removeDB();
|
||||
|
|
|
@ -38,10 +38,7 @@
|
|||
return storage.put(IMPORT_LOCATION, location);
|
||||
},
|
||||
reset() {
|
||||
return Promise.all([
|
||||
Whisper.Database.clear(),
|
||||
window.Signal.Data.removeAll(),
|
||||
]);
|
||||
return window.Signal.Data.removeAll();
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
'national_number',
|
||||
'international_number',
|
||||
],
|
||||
database: Whisper.Database,
|
||||
storeName: 'conversations',
|
||||
model: Whisper.Conversation,
|
||||
async fetchContacts() {
|
||||
const models = window.Signal.Data.getAllPrivateConversations({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue