Implement better handling for call peeking when opening the calls tab.

This commit is contained in:
Alex Hart
2024-05-02 14:25:17 -03:00
parent cd880b0879
commit 55abd88a03
6 changed files with 207 additions and 4 deletions

View File

@@ -12,13 +12,15 @@ import org.signal.ringrtc.PeekInfo
* App-level peek info object for call links.
*/
data class CallLinkPeekInfo(
val callId: CallId?
val callId: CallId?,
val isActive: Boolean
) {
companion object {
@JvmStatic
fun fromPeekInfo(peekInfo: PeekInfo): CallLinkPeekInfo {
return CallLinkPeekInfo(
callId = peekInfo.eraId?.let { CallId.fromEra(it) }
callId = peekInfo.eraId?.let { CallId.fromEra(it) },
isActive = peekInfo.joinedMembers.isNotEmpty()
)
}
}