remove some refs to Signal.Data in ts
This commit is contained in:
parent
d99cdc48f4
commit
449751a891
|
@ -31,13 +31,6 @@
|
|||
window.log.info(s);
|
||||
this.$('#status').text(s);
|
||||
},
|
||||
displayError(error) {
|
||||
this.$('#error')
|
||||
.hide()
|
||||
.text(error)
|
||||
.addClass('in')
|
||||
.fadeIn();
|
||||
},
|
||||
});
|
||||
|
||||
class TextScramble {
|
||||
|
|
|
@ -10,14 +10,16 @@ import { SessionHtmlRenderer } from '../basic/SessionHTMLRenderer';
|
|||
import { SessionSpinner } from '../basic/SessionSpinner';
|
||||
import { SessionWrapperModal } from '../SessionWrapperModal';
|
||||
|
||||
import * as Data from '../../data/data';
|
||||
|
||||
const deleteDbLocally = async () => {
|
||||
window?.log?.info('last message sent successfully. Deleting everything');
|
||||
window.persistStore?.purge();
|
||||
await window.Signal.Logs.deleteAll();
|
||||
await window.Signal.Data.removeAll();
|
||||
await window.Signal.Data.close();
|
||||
await window.Signal.Data.removeDB();
|
||||
await window.Signal.Data.removeOtherData();
|
||||
await Data.removeAll();
|
||||
await Data.close();
|
||||
await Data.removeDB();
|
||||
await Data.removeOtherData();
|
||||
window.localStorage.setItem('restart-reason', 'delete-account');
|
||||
};
|
||||
|
||||
|
|
|
@ -51,14 +51,16 @@ async function destroyExpiredMessages() {
|
|||
let timeout: NodeJS.Timeout | undefined;
|
||||
async function checkExpiringMessages() {
|
||||
// Look up the next expiring message and set a timer to destroy it
|
||||
const messages = await window.Signal.Data.getNextExpiringMessage();
|
||||
const messages = await Data.getNextExpiringMessage();
|
||||
const next = messages.at(0);
|
||||
if (!next) {
|
||||
return;
|
||||
}
|
||||
|
||||
const expiresAt = next.get('expires_at');
|
||||
|
||||
if (!expiresAt) {
|
||||
return;
|
||||
}
|
||||
window.log.info('next message expires', new Date(expiresAt).toISOString());
|
||||
window.log.info('next message expires in ', (expiresAt - Date.now()) / 1000);
|
||||
|
||||
|
|
Loading…
Reference in New Issue