mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-03 03:19:24 +01:00
Moved vacuum to cleanup
This commit is contained in:
@@ -130,18 +130,6 @@ public abstract class DB extends RoomDatabase {
|
||||
|
||||
sInstance = migrate(acontext, getBuilder(acontext));
|
||||
|
||||
// https://www.sqlite.org/lang_vacuum.html
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean vacuum = prefs.getBoolean("vacuum", false);
|
||||
if (vacuum)
|
||||
try {
|
||||
Log.i("Running VACUUM");
|
||||
sInstance.getOpenHelper().getWritableDatabase().execSQL("VACUUM;");
|
||||
prefs.edit().remove("vacuum").apply();
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
}
|
||||
|
||||
sInstance.getInvalidationTracker().addObserver(new InvalidationTracker.Observer(
|
||||
EntityAccount.TABLE_NAME,
|
||||
EntityIdentity.TABLE_NAME,
|
||||
|
||||
Reference in New Issue
Block a user