Skip to content

Conversation

nuno-vieira
Copy link
Member

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

🔗 Issue Links

Resolves IOS-757

🎯 Goal

Fix local draft attachments being deleted when navigating back to the channel list.

🛠 Implementation

The issue was that when navigating to the Channel List, it would save the draft message, but the draft.update event would be triggered as well, and we were wrongly deleting the existing local draft, which would erase the local attachments.

🧪 Manual Testing Notes

1- Open a channel
2- Save a draft with attachment
3- Go to the channel list
4- The attachemnt should appear and not disappear from the draft preview

☑️ 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 24, 2025 16:44
@Stream-SDK-Bot
Copy link
Collaborator

SDK Size

title develop branch diff status
StreamChat 7.41 MB 7.41 MB 0 KB 🟢
StreamChatUI 4.78 MB 4.78 MB 0 KB 🟢

@Stream-SDK-Bot
Copy link
Collaborator

SDK Performance

target metric benchmark branch performance status
MessageList Hitches total duration 10 ms 11.68 ms -16.8% 🔽 🔴
Duration 2.6 s 2.55 s 1.92% 🔼 🟢
Hitch time ratio 4 ms per s 4.57 ms per s -14.25% 🔽 🔴
Frame rate 75 fps 77.89 fps 3.85% 🔼 🟢
Number of hitches 1 1.0 0.0% 🟰 🟢

@Stream-SDK-Bot
Copy link
Collaborator

Stream-SDK-Bot commented Mar 24, 2025

SDK Size

title develop branch diff status
StreamChat 7.41 MB 7.41 MB 0 KB 🟢
StreamChatUI 4.78 MB 4.78 MB 0 KB 🟢

Copy link
Contributor

@laevandus laevandus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Looks great. Verified it manually and the draft message with attachments did not get removed. Also tried quitting the app and relaunching it - all good.

@testableapple testableapple added 🧪 QAing 🟢 QAed A PR that was QAed and removed 🧪 QAing labels Mar 25, 2025
Copy link

@nuno-vieira nuno-vieira enabled auto-merge (squash) March 25, 2025 17:14
@nuno-vieira nuno-vieira merged commit ce674d8 into develop Mar 25, 2025
14 checks passed
@nuno-vieira nuno-vieira deleted the fix/draft-local-attachment-erased-when-draft-is-updated-from-event branch March 25, 2025 17:50
@Stream-SDK-Bot Stream-SDK-Bot mentioned this pull request Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🟢 QAed A PR that was QAed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants