fix(message-reader): inlined image not displaying#11082
Conversation
|
✅ Validation Passed: All report and feature-flag labels are correctly set. |
d16545d to
108e11f
Compare
Looking into this now and I'll come up with a more detailed test plan, but what I found so far is that it is interpreted as a jpeg mimetype and should display. I'll try to piece out which cases fail or if it's from a specific email service. |
…ttachment view data - Add `AttachmentUiItem` sealed interface with subtypes: `RemoteImage`, `InlinedImage`, `File`, `InlinedFile` - Add `AttachmentViewInfoMapper` interface for bidirectional mapping between domain and UI layers - Implement `DefaultAttachmentViewInfoMapper` in legacy core with `AttachmentViewInfo` implementing `AttachmentMetadata` - Change `message-reader-api` and `message-reader-impl` to use `kmpCompose` plugin - Add temporary methods to `AttachmentMetadata` to avoid breaking changes with `@JvmField` properties
Could you please share with me the
I will create a separate issue to investigate this matter. Resizing images in this way would require JavaScript integration, which is disabled in our webview. |
108e11f to
eb92f25
Compare
…legacy MessageContainerView - Add `MessageReaderViewModel` to manage attachment state - Introduce `MessageReaderViewContract` with `State`, `Event`, and `ViewModel` abstraction - Create `AttachmentCard` composable for rendering attachment UI - Integrate `AttachmentViewInfoMapper` to map legacy `AttachmentViewInfo` to `AttachmentUiItem` - Add `MailPart` expect/actual interface to bridge platform-specific attachment types - Wire up attachment rendering in `MessageContainerView.renderAttachments()` using ComposeView - Register `MessageReaderViewModel` in Koin DI with `koin-core-viewmodel` - Add comprehensive unit tests for `MessageReaderViewModel` attachment mapping and filtering logic
…view all attachments
…ssues with koinViewModel - Set ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed on attachment ComposeView - Inject MessageReaderViewModel at fragment level and pass it down to MessageContainerView instead of using koinViewModel inside ComposeView
eb92f25 to
5e3b7a1
Compare
|
I really don't know what to say. I've sent dozens of emails to myself from a variety of accounts. iCloud, Gmail, Thundermail, Proton. I used the Thunderbird desktop client, Gmail on the web, my mail app, the Thunderbird app (can't do inline attachments anyway), and Apple's Mail app on iOS. With the exception of Proton on Android, they all showed up with the inline image at the bottom and a divider line where the image should be. I think it may have to do with what they send through, how they denote its place in the email, whether or not they did resizing with or without my permission, I don't know. How are you testing that you're not seeing similar results? |



Contribution Summary
Fixes: #10889
Description
This PR brings back the attachment list at the bottom of the message. Instead of just reverting the removal of the old one, I've implemented a new one using Compose, since it will be useful in the future when we migrate the Message Reader to Compose.
Changes included:
AttachmentViewInfoto KotlinBoxScopetoRemoteImageViewbutton.Screenshots
AI Disclosure
Select one of the following (mandatory)