Pin tags to favorites

This commit is contained in:
MM20
2022-09-23 22:38:44 +02:00
parent 60f36795ab
commit f16e9c2b40
15 changed files with 630 additions and 34 deletions
@@ -38,4 +38,7 @@ interface CustomAttrsDao {
@Query("SELECT DISTINCT value FROM CustomAttributes WHERE type = 'tag' ORDER BY value")
suspend fun getAllTags(): List<String>
@Query("SELECT key FROM CustomAttributes WHERE type = 'tag' AND value = :tag")
fun getItemsWithTag(tag: String): Flow<List<String>>
}
@@ -144,7 +144,7 @@ interface SearchDao {
fun getFavorite(key: String): FavoritesItemEntity?
@Query("SELECT * FROM Searchable WHERE `key` IN (:keys)")
fun getFromKeys(keys: List<String>): List<FavoritesItemEntity>
suspend fun getFromKeys(keys: List<String>): List<FavoritesItemEntity>
@Insert(onConflict = OnConflictStrategy.REPLACE)
fun insertReplaceExisting(toDatabaseEntity: FavoritesItemEntity)