oops supposed to be using a modelMapOf to have node list view update

This commit is contained in:
geeksville 2020-02-25 14:23:19 -08:00
parent 0cf0ef8caf
commit dda035cceb
2 changed files with 8 additions and 6 deletions

View file

@ -1,5 +1,6 @@
package com.geeksville.mesh.model
import androidx.compose.frames.modelMapOf
import androidx.compose.mutableStateOf
import com.geeksville.android.BuildUtils.isEmulator
import com.geeksville.mesh.MeshUser
@ -46,7 +47,7 @@ object NodeDB {
/// A map from nodeid to to nodeinfo
val nodes =
mutableMapOf(* (if (isEmulator) testNodes else listOf()).map { it.user!!.id to it }.toTypedArray())
modelMapOf(* (if (isEmulator) testNodes else listOf()).map { it.user!!.id to it }.toTypedArray())
/// Could be null if we haven't received our node DB yet
val ourNodeInfo get() = nodes[myId.value]