mirror of
https://github.com/smyalygames/checklist-tester.git
synced 2025-09-15 21:32:17 +02:00
fix(connector): made simConnection mutable to update SimStatus icon
This commit is contained in:
parent
3a0358ed9d
commit
2efc105ef2
@ -1,7 +1,8 @@
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import org.koin.core.component.KoinComponent
|
||||
|
||||
class InterfaceState : KoinComponent {
|
||||
var simConnection: Boolean = false
|
||||
var simConnection = mutableStateOf(false)
|
||||
var projectId: Int? = null
|
||||
var procedureId: Int? = null
|
||||
|
||||
|
@ -44,7 +44,7 @@ class SimulatorStatus {
|
||||
Spacer(Modifier.size(spacer - padding))
|
||||
if (refresh) {
|
||||
RefreshIndicator()
|
||||
} else if (viewModel.simConnection) {
|
||||
} else if (viewModel.simConnection.value) {
|
||||
Icon(
|
||||
painter = painterResource(Res.drawable.link_24px),
|
||||
contentDescription = "Simulator connected"
|
||||
@ -89,6 +89,6 @@ class SimulatorStatus {
|
||||
*/
|
||||
private fun loadSimulator(viewModel: InterfaceState) {
|
||||
val xpc = XPC()
|
||||
viewModel.simConnection = xpc.connected()
|
||||
viewModel.simConnection.value = xpc.connected()
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user