Periodically optimize FTS table
This commit is contained in:
parent
0e618e5091
commit
329fe8f393
9 changed files with 136 additions and 5 deletions
|
@ -90,6 +90,7 @@ import { isNotNil } from '../util/isNotNil';
|
|||
import { dropNull } from '../util/dropNull';
|
||||
import { notificationService } from '../services/notifications';
|
||||
import { storageServiceUploadJob } from '../services/storage';
|
||||
import { scheduleOptimizeFTS } from '../services/ftsOptimizer';
|
||||
import { getSendOptions } from '../util/getSendOptions';
|
||||
import { isConversationAccepted } from '../util/isConversationAccepted';
|
||||
import {
|
||||
|
@ -5120,6 +5121,8 @@ export class ConversationModel extends window.Backbone
|
|||
await window.Signal.Data.removeAllMessagesInConversation(this.id, {
|
||||
logId: this.idForLogging(),
|
||||
});
|
||||
|
||||
scheduleOptimizeFTS();
|
||||
}
|
||||
|
||||
getTitle(options?: { isShort?: boolean }): string {
|
||||
|
|
|
@ -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,
|
||||
|
@ -1192,6 +1193,8 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||
}
|
||||
|
||||
await window.Signal.Data.deleteSentProtoByMessageId(this.id);
|
||||
|
||||
scheduleOptimizeFTS();
|
||||
}
|
||||
|
||||
override isEmpty(): boolean {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue