don’t show video call button if no camera is available

This commit is contained in:
Daniel Gultsch 2021-03-26 14:04:36 +01:00
parent 1822a71c2a
commit 08f27ddcf8

View file

@ -994,8 +994,9 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
} else {
menuOngoingCall.setVisible(false);
final RtpCapability.Capability rtpCapability = RtpCapability.check(conversation.getContact());
final boolean cameraAvailable = activity != null && activity.isCameraFeatureAvailable();
menuCall.setVisible(rtpCapability != RtpCapability.Capability.NONE);
menuVideoCall.setVisible(rtpCapability == RtpCapability.Capability.VIDEO);
menuVideoCall.setVisible(rtpCapability == RtpCapability.Capability.VIDEO && cameraAvailable);
}
menuContactDetails.setVisible(!this.conversation.withSelf());
menuMucDetails.setVisible(false);