Show not supported warning for e2e rooms.
This commit is contained in:
parent
d6fcf63230
commit
6c6d0dbc3d
|
@ -674,13 +674,21 @@ class RoomDetailFragment @Inject constructor(
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
R.id.search -> {
|
R.id.search -> {
|
||||||
navigator.openSearch(requireContext(), roomDetailArgs.roomId)
|
handleSearchAction()
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
else -> super.onOptionsItemSelected(item)
|
else -> super.onOptionsItemSelected(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun handleSearchAction() {
|
||||||
|
if (session.getRoom(roomDetailArgs.roomId)?.isEncrypted() == false) {
|
||||||
|
navigator.openSearch(requireContext(), roomDetailArgs.roomId)
|
||||||
|
} else {
|
||||||
|
showDialogWithMessage(getString(R.string.search_is_not_supported_in_e2e_room))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun handleCallRequest(item: MenuItem) = withState(roomDetailViewModel) { state ->
|
private fun handleCallRequest(item: MenuItem) = withState(roomDetailViewModel) { state ->
|
||||||
val roomSummary = state.asyncRoomSummary.invoke() ?: return@withState
|
val roomSummary = state.asyncRoomSummary.invoke() ?: return@withState
|
||||||
val isVideoCall = item.itemId == R.id.video_call
|
val isVideoCall = item.itemId == R.id.video_call
|
||||||
|
|
Loading…
Reference in New Issue