vc=37 fix: pool changed from StateFlow to plain var; drop .value refs
This commit is contained in:
parent
567423336c
commit
ec9d2f37af
1 changed files with 2 additions and 2 deletions
|
|
@ -172,7 +172,7 @@ class SearchViewModel : ViewModel() {
|
|||
// Refresh the in-memory pool with the new
|
||||
// entries so subsequent reactive filters see
|
||||
// them without waiting for a process restart.
|
||||
pool.value = buildPool()
|
||||
pool = buildPool()
|
||||
}
|
||||
}
|
||||
} catch (t: Throwable) {
|
||||
|
|
@ -194,7 +194,7 @@ class SearchViewModel : ViewModel() {
|
|||
*/
|
||||
private fun reactiveFilter(q: String): List<StreamItem> {
|
||||
val needle = q.lowercase()
|
||||
return pool.value.asSequence()
|
||||
return pool.asSequence()
|
||||
.filter { item ->
|
||||
item.title.lowercase().contains(needle)
|
||||
|| item.uploader.lowercase().contains(needle)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue