Skip to content

Fix draft not deleted when attachments are removed from the composer #791

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Conversation

nuno-vieira
Copy link
Member

@nuno-vieira nuno-vieira commented Mar 26, 2025

🔗 Issue Links

https://linear.app/stream/issue/IOS-764/fix-draft-not-deleted-when-attachments-are-removed-from-the-composer

🎯 Goal

Fix draft not deleted when attachments are removed from the composer.

🛠 Implementation

Previously, we were deleting the draft only when the text was erased from the composer. Now we check whenever the attachments change to empty as well.

🧪 Manual Testing Notes

1- Open a Channel
2- Write text and an attachment
3- Leave the channel
4- Open the channel again
5- Delete the text first
6- Delete the attachment
7- Leave the channel
8- The draft should be deleted

☑️ 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 March 26, 2025 16:23
Copy link

1 Message
📖 There seems to be app changes but CHANGELOG wasn't modified.
Please include an entry if the PR includes user-facing changes.
You can find it at CHANGELOG.md.

Generated by 🚫 Danger

@nuno-vieira nuno-vieira force-pushed the fix/draft-not-deleted-when-attachments-are-deleted-from-composer branch from 4f02ad7 to 294ab79 Compare March 26, 2025 16:24
@Stream-SDK-Bot
Copy link
Collaborator

Stream-SDK-Bot commented Mar 26, 2025

SDK Size

title develop branch diff status
StreamChatSwiftUI 8.19 MB 8.21 MB +16 KB 🟢

@nuno-vieira nuno-vieira merged commit 647e136 into develop Mar 27, 2025
4 of 5 checks passed
@nuno-vieira nuno-vieira deleted the fix/draft-not-deleted-when-attachments-are-deleted-from-composer branch March 27, 2025 11:49
@Stream-SDK-Bot Stream-SDK-Bot mentioned this pull request Mar 31, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants