Compact messages_fulltext table after messages destroyed
Fixes the 'messages_fulltext_segdir' entries left after
emptying the trash folder.
@@ -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);
