mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Don't show bold markup in chats list previews.
This commit is contained in:
parent
90cd4afb8c
commit
6d17226c7f
3 changed files with 18 additions and 5 deletions
|
@ -470,11 +470,11 @@ void paintRow(
|
|||
lt_from_part,
|
||||
draftWrapped,
|
||||
lt_message,
|
||||
{
|
||||
DialogsPreviewText({
|
||||
.text = draft->textWithTags.text,
|
||||
.entities = ConvertTextTagsToEntities(
|
||||
draft->textWithTags.tags),
|
||||
},
|
||||
}),
|
||||
Text::WithEntities);
|
||||
const auto context = Core::MarkedTextContext{
|
||||
.session = &history->session(),
|
||||
|
|
|
@ -71,9 +71,20 @@ TextWithTagOffset<kTag> ReplaceTag<TextWithTagOffset<kTag>>::Call(
|
|||
} // namespace Lang
|
||||
|
||||
namespace Dialogs::Ui {
|
||||
namespace {
|
||||
|
||||
} // namespace
|
||||
TextWithEntities DialogsPreviewText(TextWithEntities text) {
|
||||
return Ui::Text::Filtered(
|
||||
std::move(text),
|
||||
{
|
||||
EntityType::Pre,
|
||||
EntityType::Code,
|
||||
EntityType::Spoiler,
|
||||
EntityType::StrikeOut,
|
||||
EntityType::Underline,
|
||||
EntityType::Italic,
|
||||
EntityType::CustomEmoji,
|
||||
});
|
||||
}
|
||||
|
||||
struct MessageView::LoadingContext {
|
||||
std::any context;
|
||||
|
@ -136,7 +147,7 @@ void MessageView::paint(
|
|||
};
|
||||
_textCache.setMarkedText(
|
||||
st::dialogsTextStyle,
|
||||
preview.text,
|
||||
DialogsPreviewText(std::move(preview.text)),
|
||||
DialogTextOptions(),
|
||||
context);
|
||||
_textCachedFor = item;
|
||||
|
|
|
@ -26,6 +26,8 @@ namespace Dialogs::Ui {
|
|||
|
||||
using namespace ::Ui;
|
||||
|
||||
[[nodiscard]] TextWithEntities DialogsPreviewText(TextWithEntities text);
|
||||
|
||||
class MessageView final {
|
||||
public:
|
||||
MessageView();
|
||||
|
|
Loading…
Add table
Reference in a new issue