talk-android icon indicating copy to clipboard operation
talk-android copied to clipboard

Implement short/long press options for "End call"/"Leave call"

Open nickvergessen opened this issue 1 year ago • 4 comments

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

nickvergessen avatar Sep 25 '24 09:09 nickvergessen

@sowjanyakch this should also be possible within a day

nickvergessen avatar Oct 10 '24 09:10 nickvergessen

yeah. I see @mahibi plan to do this task this week. If he didn't start task, I can pick it up.

sowjanyakch avatar Oct 22 '24 06:10 sowjanyakch

Clarified and you can do this

nickvergessen avatar Oct 22 '24 09:10 nickvergessen

@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 hangup function 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

mahibi avatar Oct 25 '24 08:10 mahibi