mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-23 01:45:52 +03:00
Show not supported warning for e2e rooms.
This commit is contained in:
parent
d6fcf63230
commit
6c6d0dbc3d
1 changed files with 9 additions and 1 deletions
|
@ -674,13 +674,21 @@ class RoomDetailFragment @Inject constructor(
|
|||
true
|
||||
}
|
||||
R.id.search -> {
|
||||
navigator.openSearch(requireContext(), roomDetailArgs.roomId)
|
||||
handleSearchAction()
|
||||
true
|
||||
}
|
||||
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 ->
|
||||
val roomSummary = state.asyncRoomSummary.invoke() ?: return@withState
|
||||
val isVideoCall = item.itemId == R.id.video_call
|
||||
|
|
Loading…
Reference in a new issue