Small improvements

pull/190/head
M66B 4 years ago
parent a526617d3b
commit bc917dedb5

@ -72,16 +72,22 @@ public class WorkerFts extends Worker {
Log.i("FTS index=" + id);
EntityMessage message = db.message().getMessage(id);
if (message == null)
throw new FileNotFoundException("Message gone");
if (message == null) {
Log.i("FTS gone");
continue;
}
File file = message.getFile(context);
String text = HtmlHelper.getFullText(file);
if (TextUtils.isEmpty(text))
throw new FileNotFoundException("Message empty");
if (TextUtils.isEmpty(text)) {
Log.i("FTS empty");
continue;
}
boolean fts = prefs.getBoolean("fts", false);
if (fts)
if (!fts)
break;
try {
sdb.beginTransaction();
FtsDbHelper.insert(sdb, message, text);

Loading…
Cancel
Save