mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-25 02:45:53 +03:00
Prioritize call events against live broadcast
This commit is contained in:
parent
bb7323a935
commit
59859ec02e
1 changed files with 3 additions and 1 deletions
|
@ -36,6 +36,7 @@ import im.vector.app.features.voicebroadcast.model.asVoiceBroadcastEvent
|
|||
import im.vector.app.features.voicebroadcast.usecase.GetRoomLiveVoiceBroadcastsUseCase
|
||||
import im.vector.lib.core.utils.epoxy.charsequence.toEpoxyCharSequence
|
||||
import org.matrix.android.sdk.api.extensions.orFalse
|
||||
import org.matrix.android.sdk.api.session.events.model.EventType
|
||||
import org.matrix.android.sdk.api.session.getRoom
|
||||
import org.matrix.android.sdk.api.session.room.getTimelineEvent
|
||||
import org.matrix.android.sdk.api.session.room.members.ChangeMembershipState
|
||||
|
@ -244,7 +245,8 @@ class RoomSummaryItemFactory @Inject constructor(
|
|||
val room = sessionHolder.getSafeActiveSession()?.getRoom(roomId) ?: return latestPreviewableEvent
|
||||
val liveVoiceBroadcastTimelineEvent = getRoomLiveVoiceBroadcastsUseCase.execute(roomId).lastOrNull()
|
||||
?.root?.eventId?.let { room.getTimelineEvent(it) }
|
||||
return liveVoiceBroadcastTimelineEvent
|
||||
return latestPreviewableEvent?.takeIf { it.root.getClearType() == EventType.CALL_INVITE }
|
||||
?: liveVoiceBroadcastTimelineEvent
|
||||
?: latestPreviewableEvent
|
||||
?.takeUnless { it.root.asMessageAudioEvent()?.isVoiceBroadcast().orFalse() } // Skip voice messages related to voice broadcast
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue