Drop items on tags in edit favorites sheet to tag them
This commit is contained in:
@@ -32,6 +32,7 @@ interface CustomAttributesRepository {
|
||||
|
||||
suspend fun getAllTags(startsWith: String? = null): List<String>
|
||||
fun getItemsForTag(tag: String): Flow<List<Searchable>>
|
||||
fun addTag(item: Searchable, tag: String)
|
||||
}
|
||||
|
||||
internal class CustomAttributesRepositoryImpl(
|
||||
@@ -122,6 +123,13 @@ internal class CustomAttributesRepositoryImpl(
|
||||
}
|
||||
}
|
||||
|
||||
override fun addTag(item: Searchable, tag: String) {
|
||||
val dao = appDatabase.customAttrsDao()
|
||||
scope.launch {
|
||||
dao.addTag(item.key, tag)
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun search(query: String): Flow<List<Searchable>> {
|
||||
if (query.isBlank()) {
|
||||
return flow {
|
||||
|
||||
Reference in New Issue
Block a user