mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-21 12:35:30 +03:00
fix NPE currentConversation!!.internalId
followup to PR #4439 Exception java.lang.NullPointerException: at com.nextcloud.talk.chat.MessageInputFragment.handleMessageQueue (MessageInputFragment.kt:251) at com.nextcloud.talk.chat.MessageInputFragment.access$handleMessageQueue (MessageInputFragment.kt:82) at com.nextcloud.talk.chat.MessageInputFragment$initObservers$4$1.invokeSuspend (MessageInputFragment.kt:192) at com.nextcloud.talk.chat.MessageInputFragment$initObservers$4$1.invoke (Unknown Source:12) at com.nextcloud.talk.chat.MessageInputFragment$initObservers$4$1.invoke (Unknown Source:8) at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2.emit (Emitters.kt:219) at kotlinx.coroutines.flow.FlowKt__ChannelsKt.emitAllImpl$FlowKt__ChannelsKt (Channels.kt:33) at kotlinx.coroutines.flow.FlowKt__ChannelsKt.access$emitAllImpl$FlowKt__ChannelsKt (Channels.kt:1) at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend (Unknown Source:14) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:104) at android.os.Handler.handleCallback (Handler.java:938) at android.os.Handler.dispatchMessage (Handler.java:99) at android.os.Looper.loopOnce (Looper.java:241) at android.os.Looper.loop (Looper.java:342) at android.app.ActivityThread.main (ActivityThread.java:8128) at java.lang.reflect.Method.invoke at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:583) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1045) Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
62eb4cc64d
commit
b96cd32108
1 changed files with 2 additions and 2 deletions
|
@ -248,7 +248,7 @@ class MessageInputFragment : Fragment() {
|
|||
if (isOnline) {
|
||||
chatActivity.messageInputViewModel.switchToMessageQueue(false)
|
||||
chatActivity.messageInputViewModel.sendAndEmptyMessageQueue(
|
||||
chatActivity.currentConversation!!.internalId,
|
||||
conversationInternalId,
|
||||
chatActivity.conversationUser!!.getCredentials(),
|
||||
ApiUtils.getUrlForChat(
|
||||
chatActivity.chatApiVersion,
|
||||
|
@ -796,7 +796,7 @@ class MessageInputFragment : Fragment() {
|
|||
|
||||
private fun sendMessage(message: CharSequence, replyTo: Int?, sendWithoutNotification: Boolean) {
|
||||
chatActivity.messageInputViewModel.sendChatMessage(
|
||||
chatActivity.currentConversation!!.internalId,
|
||||
conversationInternalId,
|
||||
chatActivity.conversationUser!!.getCredentials(),
|
||||
ApiUtils.getUrlForChat(
|
||||
chatActivity.chatApiVersion,
|
||||
|
|
Loading…
Reference in a new issue