Added folder last view time

This commit is contained in:
M66B
2024-03-02 21:37:59 +01:00
parent 82fde22604
commit 947ae77df3
5 changed files with 3071 additions and 22 deletions

View File

@@ -68,7 +68,7 @@ import javax.mail.internet.InternetAddress;
// https://developer.android.com/topic/libraries/architecture/room.html
@Database(
version = 290,
version = 291,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -2944,6 +2944,12 @@ public abstract class DB extends RoomDatabase {
db.execSQL("UPDATE `folder` SET `count_unread` = 0 WHERE `type` = '" + EntityFolder.JUNK + "'");
db.execSQL("UPDATE `folder` SET `count_unread` = 0 WHERE `type` = '" + EntityFolder.DRAFTS + "'");
}
}).addMigrations(new Migration(290, 291) {
@Override
public void migrate(@NonNull SupportSQLiteDatabase db) {
logMigration(startVersion, endVersion);
db.execSQL("ALTER TABLE `folder` ADD COLUMN `last_view` INTEGER");
}
}).addMigrations(new Migration(998, 999) {
@Override
public void migrate(@NonNull SupportSQLiteDatabase db) {