vc=37 fix: pool changed from StateFlow to plain var; drop .value refs

This commit is contained in:
Kayos 2026-05-25 14:09:11 -07:00
parent 567423336c
commit ec9d2f37af

View file

@ -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)