Implement short/long press options for "End call"/"Leave call"
Clarifying expectation:
- One-to-one:
- Short/Normal press: "End call" (Label (if shown) is short, but behaviour is "End call for everyone")
- Long press: "Leave call"
- Group:
- Short/Normal press: "Leave call"
- Long press: "End call for everyone"
- iOS PR https://github.com/nextcloud/talk-ios/pull/1629
@sowjanyakch this should also be possible within a day
yeah. I see @mahibi plan to do this task this week. If he didn't start task, I can pick it up.
Clarified and you can do this
@sowjanyakch this is how it could be done:
-
Pass bundle KEY_ROOM_ONE_TO_ONE to CallActivity. (This should be in ChatActivity and CallNotificationActivity)
-
Set KEY_ROOM_ONE_TO_ONE value to true if ConversationType of conversation is = ROOM_TYPE_ONE_TO_ONE_CALL (For now i would use the bundle instead to make the conversation )
-
In Call Activity get KEY_ROOM_ONE_TO_ONE from extras and set a global variable.
-
For the hangup button, just like
binding!!.hangupButton.setOnClickListener { hangup(true) }also add a long click listener. -
Add logic for different handling if it's a one to one call or not (Show a popup button like it's done in iOS: https://github.com/nextcloud/talk-ios/pull/1628). Also check moderator permissions.
-
Pass a variable to
hangupfunction if the call should be ended for all. -
Pass this variable to
hangupNetworkCalls()in order to set it in the "all" field for https://nextcloud-talk.readthedocs.io/en/latest/call/#leave-a-call-but-staying-in-the-conversation-for-future-calls-and-chat