Skip to content
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

Bugfix: Composer: text looses formatting after editing a markdown message or editing a reply message #8638

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/8638.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
User pills don't get lost at message editing anymore
Copy link

Choose a reason for hiding this comment

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

pills, or polls?

Copy link
Author

@Luka5W Luka5W Sep 20, 2023

Choose a reason for hiding this comment

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

well... i have no idea. i just stole it from here :P maybe the markdown formatting marks are called 'pills' internally? but im sure, both PRs dont affect polls in any way^^

Copy link
Author

Choose a reason for hiding this comment

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

@pludi do you have a better message for the changelog or is anyone working on merging on the PR? the code is not reviewed yet

Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,7 @@ class PlainTextComposerLayout @JvmOverloads constructor(

avatarRenderer.render(event.senderInfo.toMatrixItem(), views.composerRelatedMessageAvatar)

val content = if (specialMode is MessageComposerMode.Edit) {
formattedBody ?: defaultContent
} else {
defaultContent
}

views.composerEditText.setText(content)
views.composerEditText.setText(defaultContent)

expand {
// need to do it here also when not using quick reply
Expand Down