mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-24 07:47:59 +01:00
Auto reset fts
This commit is contained in:
@@ -54,11 +54,10 @@ public class Fts4DbHelper extends SQLiteOpenHelper {
|
||||
}
|
||||
|
||||
static SQLiteDatabase getInstance(Context context) {
|
||||
if (instance == null) {
|
||||
if (!context.getDatabasePath(DATABASE_NAME).exists()) {
|
||||
Fts5DbHelper.delete(context);
|
||||
boolean has = context.getDatabasePath(DATABASE_NAME).exists();
|
||||
if (instance == null || !has) {
|
||||
if (!has)
|
||||
DB.getInstance(context).message().resetFts();
|
||||
}
|
||||
instance = new Fts4DbHelper(context);
|
||||
}
|
||||
return instance.getWritableDatabase();
|
||||
|
||||
Reference in New Issue
Block a user