From e9011c6dac9389a6b2b7f18c61ba508ec72629e2 Mon Sep 17 00:00:00 2001 From: sowjanyakch Date: Fri, 25 Oct 2024 18:19:35 +0200 Subject: [PATCH] add short press and long press options to 1:1 conversation Signed-off-by: sowjanyakch --- .../nextcloud/talk/activities/CallActivity.kt | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt index 2a35a03d78..15ffffd8f1 100644 --- a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt @@ -143,7 +143,6 @@ import io.reactivex.Observable import io.reactivex.Observer import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.disposables.Disposable -import io.reactivex.observables.GroupedObservable import io.reactivex.schedulers.Schedulers import okhttp3.Cache import org.apache.commons.lang3.StringEscapeUtils @@ -679,8 +678,21 @@ class CallActivity : CallBaseActivity() { } } + if(isOneToOneConversation && isModerator){ + binding!!.hangupButton.setOnClickListener { + showPopupMenu() + } + } + + if(isOneToOneConversation){ + binding!!.hangupButton.setOnLongClickListener { + hangup(true, null) + true + } + } + if (isModerator && isGroupConversation) { - binding!!. hangupButton.setOnLongClickListener { + binding!!.hangupButton.setOnLongClickListener { showPopupMenu() true }