Periodically optimize FTS table

This commit is contained in:
Fedor Indutny
2023-01-24 11:13:00 -08:00
committed by GitHub
parent e8ed8b3400
commit 5dfdde998b
7 changed files with 131 additions and 0 deletions

View File

@@ -79,6 +79,7 @@ import { migrateLegacyReadStatus } from '../messages/migrateLegacyReadStatus';
import { migrateLegacySendAttributes } from '../messages/migrateLegacySendAttributes';
import { getOwn } from '../util/getOwn';
import { markRead, markViewed } from '../services/MessageUpdater';
import { scheduleOptimizeFTS } from '../services/ftsOptimizer';
import { isMessageUnread } from '../util/isMessageUnread';
import {
isDirectConversation,
@@ -1184,6 +1185,8 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
}
await window.Signal.Data.deleteSentProtoByMessageId(this.id);
scheduleOptimizeFTS();
}
override isEmpty(): boolean {