Skip to content

Conversation

nuno-vieira
Copy link
Member

@nuno-vieira nuno-vieira commented Apr 4, 2025

🔗 Issue Links

https://linear.app/stream/issue/IOS-573/[swiftui]-sending-image-while-offline-shows-double-error-indicator

🎯 Goal

Fixes the double error indicator when the attachment fails.
Fixes the pending state icon when sending a message.

🛠 Implementation

Fix the double error indicator when the attachment fails
This issue would be mostly noticable when the message text was empty, and only one attachment was sent. So the easiest fix for now is to not show the error indicator in the message in case the text is empty. Other solutions would require breaking changes, and so this one is a good middle ground.

Fix the pending state icon when sending a message
While fixing this issue, I noticed that even when sending the message offline, the error indicator would show, but the "Read indicator" would also show, which is incorrect. Besides that, now pending icon was shown because the ".sending" state was being ignored. So now we have the correct states:

  • When message fails to be sent, no read indicator should be seen.
  • When message is in pending state, it correctly displays the pending icon.

🧪 Manual Testing Notes

Fix the double error indicator when the attachment fails:

  1. Turn WiFi Off
  2. Send an attachment (Without any text)
  3. Should show only 1 error indicator

Fix the pending state icon when sending a message:

  1. Turn WiFi Off
  2. Send a message
  3. Should show pending icon
  4. Wait a few seconds
  5. Should show error indicator

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • Changelog is updated with new localization keys
  • New code is covered by unit tests
  • Documentation has been updated in the docs-content repo

@nuno-vieira nuno-vieira requested a review from a team as a code owner April 4, 2025 17:38
@Stream-SDK-Bot
Copy link
Collaborator

Stream-SDK-Bot commented Apr 4, 2025

SDK Size

title develop branch diff status
StreamChatSwiftUI 8.21 MB 8.21 MB 0 KB 🟢

Copy link

sonarqubecloud bot commented Apr 4, 2025

@nuno-vieira nuno-vieira merged commit 568942d into develop Apr 7, 2025
12 checks passed
@nuno-vieira nuno-vieira deleted the fix/double-error-indicator-when-attachment-fails branch April 7, 2025 09:26
@Stream-SDK-Bot Stream-SDK-Bot mentioned this pull request Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants