mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-29 05:37:45 +00:00
Show in chats list EntityType::Pre like EntityType::Code.
This commit is contained in:
parent
60cc232884
commit
cece9cf09b
@ -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…
x
Reference in New Issue
Block a user