Skip to content
Snippets Groups Projects
Commit e193edf8 authored by Pierre Nicolas's avatar Pierre Nicolas :joy:
Browse files

conversation: getactivecalls from daemon

Checks for activecalls at conversation startup.

GitLab: #1441
Change-Id: I07f91448597c0730ce0b11faf10317c286aa780a
parent 2367a8af
No related branches found
No related tags found
No related merge requests found
......@@ -897,7 +897,7 @@ class Account(
}
fun setActiveCalls(conversationId: String, activeCalls: List<Map<String, String>>) =
getSwarm(conversationId)?.setActiveCalls(activeCalls)
getSwarm(conversationId)?.setActiveCalls(activeCalls.map { Conversation.ActiveCall(it) })
private class ConversationComparator : Comparator<Conversation> {
override fun compare(a: Conversation, b: Conversation): Int {
......
......@@ -772,8 +772,8 @@ class Conversation : ConversationHistory {
}
}
fun setActiveCalls(activeCalls: List<Map<String, String>>) =
activeCallsSubject.onNext(activeCalls.map { ActiveCall(it) })
fun setActiveCalls(activeCalls: List<ActiveCall>) =
activeCallsSubject.onNext(activeCalls)
private val conferenceStarted: MutableMap<String, Call> = HashMap()
private val conferenceEnded: MutableMap<String, Call> = HashMap()
......
......@@ -268,6 +268,9 @@ class AccountService(
val mode = if ("true" == info["syncing"]) Conversation.Mode.Syncing else Conversation.Mode.values()[info["mode"]?.toInt() ?: Conversation.Mode.Syncing.ordinal]
val conversation = account.newSwarm(conversationId, mode)
conversation.setProfile(mVCardService.loadConversationProfile(info))
JamiService.getActiveCalls(account.accountId, conversationId)
.map { Conversation.ActiveCall(it) }
.let { conversation.setActiveCalls(it) }
val preferences = // Load conversation preferences (color, symbol, etc.)
JamiService.getConversationPreferences(account.accountId, conversationId)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment