only check once for filters v2 availability (#4539)
Instead of calling the endpoint every time filters are needed, it will be called only once and the result cached. This will result in quite some requests less on instances supporting v2. I also tested v1 filters and made some small improvements. We should [remove filters v1 support](https://github.com/tuskyapp/Tusky/issues/4538) some time in the future though.
This commit is contained in:
parent
859ffd121e
commit
8a57bcc3f4
13 changed files with 1470 additions and 127 deletions
|
|
@ -62,14 +62,15 @@ import java.io.File;
|
|||
},
|
||||
// Note: Starting with version 54, database versions in Tusky are always even.
|
||||
// This is to reserve odd version numbers for use by forks.
|
||||
version = 62,
|
||||
version = 64,
|
||||
autoMigrations = {
|
||||
@AutoMigration(from = 48, to = 49),
|
||||
@AutoMigration(from = 49, to = 50, spec = AppDatabase.MIGRATION_49_50.class),
|
||||
@AutoMigration(from = 50, to = 51),
|
||||
@AutoMigration(from = 51, to = 52),
|
||||
@AutoMigration(from = 53, to = 54), // hasDirectMessageBadge in AccountEntity
|
||||
@AutoMigration(from = 56, to = 58) // translationEnabled in InstanceEntity/InstanceInfoEntity
|
||||
@AutoMigration(from = 56, to = 58), // translationEnabled in InstanceEntity/InstanceInfoEntity
|
||||
@AutoMigration(from = 62, to = 64) // filterV2Available in InstanceEntity
|
||||
}
|
||||
)
|
||||
public abstract class AppDatabase extends RoomDatabase {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue