From 5cca842e6621818f81bf9ff4009fa7ed72d7cb6f Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 7 Mar 2024 13:37:40 +0100 Subject: [PATCH] fix return to call --- .../eu/siacs/conversations/ui/ConversationFragment.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index c97aea645..763bc3760 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -1560,17 +1560,18 @@ public class ConversationFragment extends XmppFragment RtpSessionActivity.EXTRA_ACCOUNT, id.getAccount().getJid().asBareJid().toEscapedString()); intent.putExtra(RtpSessionActivity.EXTRA_WITH, id.getWith().toEscapedString()); - if (id instanceof AbstractJingleConnection.Id) { + if (id instanceof AbstractJingleConnection) { intent.setAction(Intent.ACTION_VIEW); intent.putExtra(RtpSessionActivity.EXTRA_SESSION_ID, id.getSessionId()); - } else if (id instanceof JingleConnectionManager.RtpSessionProposal) { - if (((JingleConnectionManager.RtpSessionProposal) id).media.contains(Media.VIDEO)) { + startActivity(intent); + } else if (id instanceof JingleConnectionManager.RtpSessionProposal proposal) { + if (proposal.media.contains(Media.VIDEO)) { intent.setAction(RtpSessionActivity.ACTION_MAKE_VIDEO_CALL); } else { intent.setAction(RtpSessionActivity.ACTION_MAKE_VOICE_CALL); } + startActivity(intent); } - startActivity(intent); } }