Fix initialization order in background.ts

This commit is contained in:
Fedor Indutny 2024-08-05 16:33:12 -07:00 committed by GitHub
parent c4541516b1
commit 03bc4764bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1411,6 +1411,8 @@ export async function startApp(): Promise<void> {
void badgeImageFileDownloader.checkForFilesToDownload();
initializeExpiringMessageService(singleProtoJobQueue);
log.info('Expiration start timestamp cleanup: starting...');
const messagesUnexpectedlyMissingExpirationStartTimestamp =
await DataReader.getMessagesUnexpectedlyMissingExpirationStartTimestamp();
@ -1504,8 +1506,6 @@ export async function startApp(): Promise<void> {
window.Whisper.events.trigger('timetravel');
});
initializeExpiringMessageService(singleProtoJobQueue);
void updateExpiringMessagesService();
void tapToViewMessagesDeletionService.update();
window.Whisper.events.on('timetravel', () => {