Re-enable FTS optimization after deletes.

This commit is contained in:
Greyson Parrelli
2023-02-10 12:54:42 -05:00
parent dda5037429
commit afbce6f800
2 changed files with 13 additions and 12 deletions

View File

@@ -1533,12 +1533,11 @@ public class MessageTable extends DatabaseTable implements MessageTypes, Recipie
return releaseChannelThreadId;
}
public void deleteGroupStoryReplies(long parentStoryId) {
private void deleteGroupStoryReplies(long parentStoryId) {
SQLiteDatabase db = databaseHelper.getSignalWritableDatabase();
String[] args = SqlUtil.buildArgs(parentStoryId);
db.delete(TABLE_NAME, PARENT_STORY_ID + " = ?", args);
OptimizeMessageSearchIndexJob.enqueue();
}
public int deleteStoriesOlderThan(long timestamp, boolean hasSeenReleaseChannelStories) {
@@ -1940,6 +1939,8 @@ public class MessageTable extends DatabaseTable implements MessageTypes, Recipie
db.endTransaction();
}
OptimizeMessageSearchIndexJob.enqueue();
ApplicationDependencies.getDatabaseObserver().notifyMessageUpdateObservers(new MessageId(messageId));
ApplicationDependencies.getDatabaseObserver().notifyConversationListListeners();