-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix HTML display of multipart messages with truncated parts (#4462) #6331
Conversation
…4462) Otherwise the "Show Full Message..." button appears somewhere in the middle of the multipart message, e.g. after a text in the first message bubble, but before a text in the second bubble. Moreover, if the second/n-th bubble's text is shortened (ends with "[...]"), the user should scroll up to click on "Show Full Message..." which doesn't look reasonable. Scrolling down looks more acceptable (e.g. if the first bubble's text is shortened in a multipart message). I'd even suggest to show somehow that message bubbles belong to the same multipart message, e.g. add "[↵]" to the text of all bubbles except the last one, but let's discuss this first.
This fixes the HTML display of messages containing forwarded messages. Before, forwarded messages weren't rendered in HTML and if a forwarded message is long and therefore truncated in the chat, it could only be seen in the "Message Info". In #4462 it was suggested to display "Show Full Message..." for each truncated message part and save to `msgs.mime_headers` only the corresponding part, but this is a quite huge change and refactoring and also it may be good that currently we save the full message structure to `msgs.mime_headers`, so i'd suggest not to change this for now.
@@ -100,8 +107,8 @@ impl HtmlMsgParser { | |||
} else { | |||
parser.cid_to_data_recursive(context, &parsedmail).await?; | |||
} | |||
|
|||
Ok(parser) | |||
parser.html += &mem::take(&mut parser.msg_html); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This results in several html documents joined sequentially, Firefox displays it w/o any problems, but this should be checked in the Delta Chat apps as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't work in DC Desktop, only the first HTML is shown :( Will join them into one HTML document then.
EDIT: Works at least on Desktop. On Android i didn't check, but i checked that the default HTML viewer shows such a concatenated HTML as expected, so going to merge this...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably it's not feasible to join HTMLs into one anyway, one HTML can be sent by another MUA, another one generated locally f.e.
If adding something like ↩️ is easy, then could be added. But if it is not trivial, then supporting multi-part non-delta chat messages is very low priority I'd say. |
Decided not to do this, it would be nice to show somehow that message bubbles belong to the same multipart message, but just adding ↩️ worsens "Reply" and "Copy Text" experience. |
Fix #4462
See commit messages. I suggest to fix this somehow to avoid huge refactoring. Not sure, but maybe it's even good that we have the full decrypted message structure in
mime_headers
.