mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-19 10:45:13 +01:00
Merge pull request #3803 from nextcloud/bugfix/noid/fixNpeForConversationCreation
avoid NPE when context is not known when creating conversation
This commit is contained in:
commit
e57f08f2d5
@ -208,6 +208,7 @@ class CreateConversationDialogFragment : DialogFragment() {
|
|||||||
Log.e(TAG, "Failed to create conversation")
|
Log.e(TAG, "Failed to create conversation")
|
||||||
showError()
|
showError()
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {}
|
else -> {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -256,13 +257,14 @@ class CreateConversationDialogFragment : DialogFragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun initiateConversation(roomToken: String) {
|
private fun initiateConversation(roomToken: String) {
|
||||||
val bundle = Bundle()
|
activity?.let {
|
||||||
bundle.putString(BundleKeys.KEY_ROOM_TOKEN, roomToken)
|
val bundle = Bundle()
|
||||||
|
bundle.putString(BundleKeys.KEY_ROOM_TOKEN, roomToken)
|
||||||
val chatIntent = Intent(context, ChatActivity::class.java)
|
val chatIntent = Intent(it, ChatActivity::class.java)
|
||||||
chatIntent.putExtras(bundle)
|
chatIntent.putExtras(bundle)
|
||||||
chatIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
chatIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||||
startActivity(chatIntent)
|
startActivity(chatIntent)
|
||||||
|
}
|
||||||
|
|
||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user