mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-13 12:33:42 +02:00
Run FTS insert in transaction
This commit is contained in:
@@ -72,7 +72,13 @@ public class WorkerFts extends Worker {
|
||||
File file = message.getFile(getApplicationContext());
|
||||
String html = Helper.readText(file);
|
||||
String text = HtmlHelper.getText(html);
|
||||
FtsDbHelper.insert(sdb, message, text);
|
||||
try {
|
||||
sdb.beginTransaction();
|
||||
FtsDbHelper.insert(sdb, message, text);
|
||||
sdb.setTransactionSuccessful();
|
||||
} finally {
|
||||
sdb.endTransaction();
|
||||
}
|
||||
|
||||
indexed++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user