Fix conversations (#2556)
* fix conversations * cleanup ConversationsRemoteMediator * update conversation timestamps regularly * improve loadStateListener * add db migration * make deleting from conversation db suspending * reorganize code in ConversationsFragment * delete NetworkStateViewHolder * cleanup imports * add 38.json * honor fabHide setting in ConversationsFragment * set page size to 30
This commit is contained in:
parent
2983c3f48e
commit
131309e99c
14 changed files with 314 additions and 200 deletions
|
|
@ -565,10 +565,12 @@ public abstract class AppDatabase extends RoomDatabase {
|
|||
public static final Migration MIGRATION_37_38 = new Migration(37, 38) {
|
||||
@Override
|
||||
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||
|
||||
// no actual scheme change, but timestamps are now serialized differently so all cache tables that contain them need to be cleaned
|
||||
database.execSQL("DELETE FROM `TimelineStatusEntity`");
|
||||
// database needs to be cleaned because the ConversationAccountEntity got a new attribute
|
||||
database.execSQL("DELETE FROM `ConversationEntity`");
|
||||
database.execSQL("ALTER TABLE `ConversationEntity` ADD COLUMN `order` INTEGER NOT NULL DEFAULT 0");
|
||||
|
||||
// timestamps are now serialized differently so all cache tables that contain them need to be cleaned
|
||||
database.execSQL("DELETE FROM `TimelineStatusEntity`");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue