From 82ead4f3f5756fd7adc60405dab9f9e0db011310 Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Tue, 15 Mar 2022 19:09:19 +0100 Subject: [PATCH] Replaces call option condition with isDirect --- .../features/home/room/detail/RoomDetailViewState.kt | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailViewState.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailViewState.kt index b05cf294cd..87eae1bc2d 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailViewState.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailViewState.kt @@ -88,15 +88,7 @@ data class RoomDetailViewState( rootThreadEventId = args.threadTimelineArgs?.rootThreadEventId ) - // TODO: Add condition here to check that room is DM-based group chat and not group room - fun isWebRTCCallOptionAvailable() = asyncRoomSummary.invoke()?.let { roomSummary -> - val joinedMembersCount = roomSummary.joinedMembersCount ?: 0 - val isDirect = roomSummary.isDirect - Timber.d("WebRTCTest roomSummary: $roomSummary") - Timber.d("WebRTCTest joined members: $joinedMembersCount") - Timber.d("WebRTCTest isDirect: $isDirect") - joinedMembersCount <= 2 - } ?: true // if room summary cannot be found, assume call option should be available + fun isWebRTCCallOptionAvailable() = asyncRoomSummary.invoke()?.isDirect ?: true fun isSearchAvailable() = asyncRoomSummary()?.isEncrypted == false