Save the user's reading position in the home timeline (#3614)
- Add a field to AccountEntity to hold the reading position - Provide a method to save in the viewmodel to save the position - Save the position when TimelineFragment pauses Does not restore the position yet.
This commit is contained in:
parent
0c02dd18bf
commit
367240a612
7 changed files with 1050 additions and 5 deletions
|
|
@ -16,6 +16,7 @@
|
|||
package com.keylesspalace.tusky.db;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.room.AutoMigration;
|
||||
import androidx.room.Database;
|
||||
import androidx.room.RoomDatabase;
|
||||
import androidx.room.migration.Migration;
|
||||
|
|
@ -29,9 +30,20 @@ import java.io.File;
|
|||
/**
|
||||
* DB version & declare DAO
|
||||
*/
|
||||
@Database(entities = { DraftEntity.class, AccountEntity.class, InstanceEntity.class, TimelineStatusEntity.class,
|
||||
TimelineAccountEntity.class, ConversationEntity.class
|
||||
}, version = 48)
|
||||
@Database(
|
||||
entities = {
|
||||
DraftEntity.class,
|
||||
AccountEntity.class,
|
||||
InstanceEntity.class,
|
||||
TimelineStatusEntity.class,
|
||||
TimelineAccountEntity.class,
|
||||
ConversationEntity.class
|
||||
},
|
||||
version = 49,
|
||||
autoMigrations = {
|
||||
@AutoMigration(from = 48, to = 49)
|
||||
}
|
||||
)
|
||||
public abstract class AppDatabase extends RoomDatabase {
|
||||
|
||||
public abstract AccountDao accountDao();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue