mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Move all remaining stores to SQLCipher
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user