chat-sdk / chat-sdk-android

Chat SDK Android - Open Source Mobile Messenger

Home Page:https://chatsdk.co

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue while sending Image Messages after click back and again redirect to ChatActivity

Mari250490 opened this issue · comments

  1. Is the bug present in the demo Chat SDK project?
    Yes

  2. What modifications have you made to the Chat SDK?
    No modification

  3. Android Version:
    checked in Android 11 and Android 9

  4. Steps taken to reproduce the problem:

ChatActivity - click + -> Upload image from Selecting Photo option from MediaChatOption -> Crop Image click Crop came back to ChatActivity.
Image message showing Staus as Uploading for few seconds meanwhile -> Click back button navigate to MainAppBarActivity and upload done Successfully getting URL but Status , URL for the message not getting updated.

  1. Expected result:
    While uploading images click back and come back again to ChatActivity image message should sent and show with correct status

  2. Actual result:
    while clicking back during image upload and come back to ChatActivity Image Message always showing Uoloading and no image shown. Image was uploaded to server and got the URL.

  3. Comments:
    StackTrace : Completable sdk.chat.core.rigs.MessageSendRig.uploadFiles

completables.add(ChatSDK.upload().uploadFile(item.getBytes(), item.name, item.mimeType)
.flatMapMaybe(result -> {
Not triggering once clicking back from ChatActivity during uploading
}

return Single.create(---
----).doOnComplete(() -> {
Not triggering once clicking back from ChatActivity during uploading
});

ChatSDK Version - 5.2.7
No Modification in code
Platform - Android
Tested with demo from github master branch(5.2.6) able to reproduce same.

Any update on the issue

This is fixed in the latest version.