Skip to content

Conversation

nuno-vieira
Copy link
Member

@nuno-vieira nuno-vieira commented Sep 15, 2025

🔗 Issue Links

IOS-1014
IOS-817

🎯 Goal

  • Fix composer not showing images in the composer when editing signed attachments
  • Fix replacing an image while editing a message not showing the new image in the message list
  • Removes dead code

🧪 Manual Testing Notes

Fix composer not showing images in the composer when editing signed attachments:
N/A

Fix replacing an image while editing a message not showing the new image in the message list:

  1. Send a message with an image
  2. Long tap the message
  3. Edit the message
  4. Remove the existing image and upload a new one
  5. Send the message
  6. The new message should appear while uploading and also when finished

☑️ 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 September 15, 2025 08:50
Copy link

Public Interface

- public struct MediaAttachment: Identifiable  
+ public struct MediaAttachment: Identifiable, Equatable  
+   
+ 
+   public static func ==(lhs: MediaAttachment,rhs: MediaAttachment)-> Bool

@Stream-SDK-Bot
Copy link
Collaborator

Stream-SDK-Bot commented Sep 15, 2025

SDK Size

title develop branch diff status
StreamChatSwiftUI 9.38 MB 9.38 MB +1 KB 🟢

Copy link
Contributor

@martinmitrevski martinmitrevski left a comment

Choose a reason for hiding this comment

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

few issues:

  • seems like both the keyboard and the image attachments are shown at the same time, leading to this UI:
IMG_4343 - if I start editing, leave the screen, it treats it as a draft which if I send it - it sends it as a new message. Probably, we should disable saving a draft when it's an edited message?


// If there is a custom CDN, we need to load the image from the CDN
// especially if the images are signed.
if !(utils.imageCDN is StreamImageCDN) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a bit unsafe if we decide to provide a new implementation

Copy link
Member Author

Choose a reason for hiding this comment

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

I can just always use the CDN, I initially I did this because of the tests, but will change it. It will simplify the code as well

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed ✅

@nuno-vieira
Copy link
Member Author

nuno-vieira commented Sep 15, 2025

few issues:

  • seems like both the keyboard and the image attachments are shown at the same time, leading to this UI:

IMG_4343 - if I start editing, leave the screen, it treats it as a draft which if I send it - it sends it as a new message. Probably, we should disable saving a draft when it's an edited message?

Yeah, that UI is a known issue that is in the backlog. Discarding the draft when editing is questionable 🤔 On UIKit at the moment we have this behaviour. In one way, if you are editing a long message and accidentally leave the channel, it is kinda nice that we save the edit. At the moment, the reference of the edited message is not saved, so the user would need to tap on edit again. So yeah at the moment even if we wanted to save the draft edited message, it is incomplete 🤔

Update:
For now, I removed the draft when editing a message

Copy link

@nuno-vieira nuno-vieira merged commit 5febf80 into develop Sep 15, 2025
11 checks passed
@nuno-vieira nuno-vieira deleted the fix/composer-not-showing-images-when-editing-signed-attachments branch September 15, 2025 16:08
@Stream-SDK-Bot Stream-SDK-Bot mentioned this pull request Sep 22, 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