File tree Expand file tree Collapse file tree 5 files changed +9
-8
lines changed
java/im/vector/app/features Expand file tree Collapse file tree 5 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 1+ Fixes voice call button disappearing in DM rooms with more than 2 members
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ import org.matrix.android.sdk.api.session.room.model.Membership
8888 fun render (roomDetailViewState : RoomDetailViewState ) {
8989 val summary = roomDetailViewState.asyncRoomSummary()
9090 val newState = if (summary?.membership != Membership .JOIN ||
91- roomDetailViewState.isWebRTCCallOptionAvailable () ||
91+ roomDetailViewState.isCallOptionAvailable () ||
9292 ! roomDetailViewState.isAllowedToManageWidgets ||
9393 roomDetailViewState.jitsiState.widgetId == null ) {
9494 State .Unmount
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ data class RoomDetailViewState(
8787 rootThreadEventId = args.threadTimelineArgs?.rootThreadEventId
8888 )
8989
90- fun isWebRTCCallOptionAvailable () = ( asyncRoomSummary.invoke()?.joinedMembersCount ? : 0 ) <= 2
90+ fun isCallOptionAvailable () = asyncRoomSummary.invoke()?.isDirect ? : true
9191
9292 fun isSearchAvailable () = asyncRoomSummary()?.isEncrypted == false
9393
Original file line number Diff line number Diff line change @@ -713,10 +713,10 @@ class TimelineViewModel @AssistedInject constructor(
713713 R .id.timeline_setting -> true
714714 R .id.invite -> state.canInvite
715715 R .id.open_matrix_apps -> true
716- R .id.voice_call -> state.isWebRTCCallOptionAvailable ()
717- R .id.video_call -> state.isWebRTCCallOptionAvailable () || state.jitsiState.confId == null || state.jitsiState.hasJoined
716+ R .id.voice_call -> state.isCallOptionAvailable ()
717+ R .id.video_call -> state.isCallOptionAvailable () || state.jitsiState.confId == null || state.jitsiState.hasJoined
718718 // Show Join conference button only if there is an active conf id not joined. Otherwise fallback to default video disabled. ^
719- R .id.join_conference -> ! state.isWebRTCCallOptionAvailable () && state.jitsiState.confId != null && ! state.jitsiState.hasJoined
719+ R .id.join_conference -> ! state.isCallOptionAvailable () && state.jitsiState.confId != null && ! state.jitsiState.hasJoined
720720 R .id.search -> state.isSearchAvailable()
721721 R .id.menu_timeline_thread_list -> vectorPreferences.areThreadMessagesEnabled()
722722 R .id.dev_tools -> vectorPreferences.developerMode()
Original file line number Diff line number Diff line change 2525 android : title =" @string/action_video_call"
2626 android : visible =" false"
2727 app : iconTint =" ?colorPrimary"
28- app : showAsAction =" always "
28+ app : showAsAction =" ifRoom "
2929 tools : visible =" true" />
3030
3131 <item
3434 android : title =" @string/call"
3535 android : visible =" false"
3636 app : iconTint =" ?colorPrimary"
37- app : showAsAction =" always "
37+ app : showAsAction =" ifRoom "
3838 tools : visible =" true" />
3939
4040 <item
4343 android : visible =" false"
4444 app : iconTint =" ?colorPrimary"
4545 app : actionLayout =" @layout/view_thread_notification_badge"
46- app : showAsAction =" always "
46+ app : showAsAction =" ifRoom "
4747 tools : visible =" true" />
4848
4949 <item android : id =" @+id/join_conference"
You can’t perform that action at this time.
0 commit comments