mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Show in chats list EntityType::Pre like EntityType::Code.
This commit is contained in:
parent
60cc232884
commit
cece9cf09b
1 changed files with 10 additions and 1 deletions
|
@ -73,7 +73,7 @@ TextWithTagOffset<kTag> ReplaceTag<TextWithTagOffset<kTag>>::Call(
|
|||
namespace Dialogs::Ui {
|
||||
|
||||
TextWithEntities DialogsPreviewText(TextWithEntities text) {
|
||||
return Ui::Text::Filtered(
|
||||
auto result = Ui::Text::Filtered(
|
||||
std::move(text),
|
||||
{
|
||||
EntityType::Pre,
|
||||
|
@ -85,6 +85,15 @@ TextWithEntities DialogsPreviewText(TextWithEntities text) {
|
|||
EntityType::CustomEmoji,
|
||||
EntityType::PlainLink,
|
||||
});
|
||||
for (auto &entity : result.entities) {
|
||||
if (entity.type() == EntityType::Pre) {
|
||||
entity = EntityInText(
|
||||
EntityType::Code,
|
||||
entity.offset(),
|
||||
entity.length());
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
struct MessageView::LoadingContext {
|
||||
|
|
Loading…
Add table
Reference in a new issue