Merge pull request #4722 from basilgello/remove-fulltext-remnants

Compact messages_fulltext table after messages destroyed
This commit is contained in:
cketti 2020-05-04 14:54:25 +02:00 committed by GitHub
commit c26037c534
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1636,6 +1636,8 @@ public class LocalFolder {
}
}
compactFulltextEntries(db);
return null;
});
}
@ -1824,6 +1826,10 @@ public class LocalFolder {
db.delete("messages_fulltext", "docid = ?", idArg);
}
void compactFulltextEntries(SQLiteDatabase db) {
db.execSQL("INSERT INTO messages_fulltext(messages_fulltext) VALUES('optimize')");
}
void deleteMessagePartsAndDataFromDisk(final long rootMessagePartId) throws MessagingException {
deleteMessageDataFromDisk(rootMessagePartId);
deleteMessageParts(rootMessagePartId);