Fixed call order

This commit is contained in:
Juha Heinanen
2026-01-12 22:33:47 +02:00
parent b07f0afbcf
commit 019d36e0d7
@@ -42,7 +42,7 @@ class Call(val callp: Long, val ua: UserAgent, val peerUri: String, val dir: Str
val focusDtmf: MutableState<Boolean> = mutableStateOf(false) val focusDtmf: MutableState<Boolean> = mutableStateOf(false)
fun add() { fun add() {
BaresipService.calls.add(0, this) BaresipService.calls.add(this)
} }
fun remove() { fun remove() {
@@ -133,7 +133,7 @@ class Call(val callp: Long, val ua: UserAgent, val peerUri: String, val dir: Str
} }
fun call(status: String): Call? { fun call(status: String): Call? {
for (c in BaresipService.calls.reversed()) for (c in BaresipService.calls)
if (c.status.value == status) return c if (c.status.value == status) return c
return null return null
} }