mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-27 01:54:43 +01:00
Ensure voice call menu item is visible to the user when there is only one room member. The video call menu item is already visible (for other previous reason).
This commit is contained in:
parent
f48be229c8
commit
2a8134af89
@ -87,7 +87,12 @@ data class RoomDetailViewState(
|
||||
rootThreadEventId = args.threadTimelineArgs?.rootThreadEventId
|
||||
)
|
||||
|
||||
fun isCallOptionAvailable() = asyncRoomSummary.invoke()?.isDirect ?: true
|
||||
fun isCallOptionAvailable(): Boolean {
|
||||
return asyncRoomSummary.invoke()?.isDirect ?: true ||
|
||||
// When there is only one member, a warning will be displayed when the user
|
||||
// clicks on the menu item to start a call
|
||||
asyncRoomSummary.invoke()?.joinedMembersCount == 1
|
||||
}
|
||||
|
||||
fun isSearchAvailable() = asyncRoomSummary()?.isEncrypted == false
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user