Remove some unnecessary call tab requeries.

This commit is contained in:
Greyson Parrelli
2024-11-26 11:06:48 -05:00
parent 4b21e6a39f
commit 878900c09c
3 changed files with 22 additions and 0 deletions

View File

@@ -82,6 +82,7 @@ class CallLogViewModel(
disposables += AppDependencies
.signalCallManager
.peekInfoCache
.skipWhile { cache -> cache.isEmpty() || cache.values.all { it.isCompletelyInactive } }
.observeOn(Schedulers.computation())
.distinctUntilChanged()
.subscribe {

View File

@@ -17,6 +17,10 @@ data class CallLinkPeekInfo(
val isActive: Boolean,
val isJoined: Boolean
) {
val isCompletelyInactive
get() = callId == null && !isActive && !isJoined
companion object {
@JvmStatic
fun fromPeekInfo(peekInfo: PeekInfo): CallLinkPeekInfo {