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
|
// Refresh the in-memory pool with the new
|
||||||
// entries so subsequent reactive filters see
|
// entries so subsequent reactive filters see
|
||||||
// them without waiting for a process restart.
|
// them without waiting for a process restart.
|
||||||
pool.value = buildPool()
|
pool = buildPool()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (t: Throwable) {
|
} catch (t: Throwable) {
|
||||||
|
|
@ -194,7 +194,7 @@ class SearchViewModel : ViewModel() {
|
||||||
*/
|
*/
|
||||||
private fun reactiveFilter(q: String): List<StreamItem> {
|
private fun reactiveFilter(q: String): List<StreamItem> {
|
||||||
val needle = q.lowercase()
|
val needle = q.lowercase()
|
||||||
return pool.value.asSequence()
|
return pool.asSequence()
|
||||||
.filter { item ->
|
.filter { item ->
|
||||||
item.title.lowercase().contains(needle)
|
item.title.lowercase().contains(needle)
|
||||||
|| item.uploader.lowercase().contains(needle)
|
|| item.uploader.lowercase().contains(needle)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue