Search: introduce weighted reordering (#272)

* Database: backend for weights & timestamps

- Migration 21->22
- SearchableLaunchTimestampEntity.kt
- `weight`-column in SavedSearchableEntity
- Queries for sorting by and adjusting weight
- Queries for sorting by recent use

* move weightfactor access to favoritesRepository

* reorder calls in SearchVM

* no more datahoarding

* add settings screen for ordering

* ui fix, animations

* move ordering settings out of own screen

* remove unused localization

* weight factors

* larger factor for WeightFactor.High

* cleanup

* sort favorites by weight

* icons for favorite screen

* I hate coming up with descriptive strings

* add default weight factor to settings migration

* Add default values for search result ordering preferences

* Favorites settings: change order of preferences

* Change strings

* Replace favorites variability slider with list preference

* migration initial weight

* Change labels

* Include searchable weight column in backup

---------

Co-authored-by: MM20 <15646950+MM2-0@users.noreply.github.com>
This commit is contained in:
Christoph
2023-03-10 22:17:03 +01:00
committed by GitHub
co-authored by MM20
parent 003789f310
commit 2c9cba72a9
21 changed files with 838 additions and 163 deletions
@@ -182,8 +182,13 @@ class BackupManager(
}
companion object {
/**
* Format changelog:
* - 1.5: added `weight` to favorites
*/
private const val BackupFormatMajor = 1
private const val BackupFormatMinor = 4
private const val BackupFormatMinor = 5
internal const val BackupFormat = "$BackupFormatMajor.$BackupFormatMinor"
}
}