ConnectyCube / connectycube-flutter-sdk-releases

ConnectyCube Flutter SDK Releases
7 stars 1 forks source link

'Delivered' status doesn't listen any change #47

Closed JErazo7 closed 3 years ago

JErazo7 commented 3 years ago

Platform (use [x]) [x] Android [x] iOS

Device info Emulators: Pixel 4 XL API 30 and Iphone 12 Pro Max iOS 14.4

Describe the bug: This code doesn't listen any changes. MessagesStatusesManager messagesStatusesManager = CubeChatConnection.instance.messagesStatusesManager; messagesStatusesManager.deliveredStream.listen((messageStatuses){ print("Message RECEIVED ${messageStatuses.userId}, ${messageStatuses.messageId}, ${messageStatuses.dialogId}"); });

Steps to Reproduce:

  1. Download flutter example https://github.com/ConnectyCube/connectycube-flutter-samples/tree/master/chat_sample
  2. Comment out the lines 813-815 on chat_dialog_screen.dart to avoid the 'Read' status listener and to avoid the 'Read' status listener and be able to verify only the behavior of 'Delivered' status
  3. Start a private chat

Actual result: Message status is not updated to delivered

Additional info I am implementing the sdk in another project and it doesn't work either. The skd version is the last stable one in pub.dev

TatankaConCube commented 3 years ago

you can fix it by changing line 145 from

_cubeDialog.readMessage(message);

to

_cubeDialog.deliverMessage(message);
JErazo7 commented 3 years ago

Thanks so much. It works perfectly with your solution.