mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-16 09:15:30 +01:00
Merge pull request #2841 from nextcloud/bugfix/noid/avoidNpeStartCall
Fix rare crash when starting call
This commit is contained in:
commit
397b498d48
@ -1994,6 +1994,8 @@ class ChatController(args: Bundle) :
|
|||||||
Log.d(TAG, "joinRoomWithPassword - joinRoom - got response: $startNanoTime")
|
Log.d(TAG, "joinRoomWithPassword - joinRoom - got response: $startNanoTime")
|
||||||
|
|
||||||
val conversation = roomOverall.ocs!!.data!!
|
val conversation = roomOverall.ocs!!.data!!
|
||||||
|
currentConversation = conversation
|
||||||
|
|
||||||
sessionIdAfterRoomJoined = conversation.sessionId
|
sessionIdAfterRoomJoined = conversation.sessionId
|
||||||
ApplicationWideCurrentRoomHolder.getInstance().session = conversation.sessionId
|
ApplicationWideCurrentRoomHolder.getInstance().session = conversation.sessionId
|
||||||
ApplicationWideCurrentRoomHolder.getInstance().currentRoomId = conversation.roomId
|
ApplicationWideCurrentRoomHolder.getInstance().currentRoomId = conversation.roomId
|
||||||
@ -2823,7 +2825,9 @@ class ChatController(args: Bundle) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun startACall(isVoiceOnlyCall: Boolean, callWithoutNotification: Boolean) {
|
private fun startACall(isVoiceOnlyCall: Boolean, callWithoutNotification: Boolean) {
|
||||||
val pp = ParticipantPermissions(conversationUser!!, currentConversation!!)
|
currentConversation?.let {
|
||||||
|
if (conversationUser != null) {
|
||||||
|
val pp = ParticipantPermissions(conversationUser, it)
|
||||||
if (!pp.canStartCall() && currentConversation?.hasCall == false) {
|
if (!pp.canStartCall() && currentConversation?.hasCall == false) {
|
||||||
Toast.makeText(context, R.string.startCallForbidden, Toast.LENGTH_LONG).show()
|
Toast.makeText(context, R.string.startCallForbidden, Toast.LENGTH_LONG).show()
|
||||||
} else {
|
} else {
|
||||||
@ -2834,6 +2838,8 @@ class ChatController(args: Bundle) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun getIntentForCall(isVoiceOnlyCall: Boolean, callWithoutNotification: Boolean): Intent? {
|
private fun getIntentForCall(isVoiceOnlyCall: Boolean, callWithoutNotification: Boolean): Intent? {
|
||||||
currentConversation?.let {
|
currentConversation?.let {
|
||||||
|
Loading…
Reference in New Issue
Block a user