mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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 {
|
namespace Dialogs::Ui {
|
||||||
|
|
||||||
TextWithEntities DialogsPreviewText(TextWithEntities text) {
|
TextWithEntities DialogsPreviewText(TextWithEntities text) {
|
||||||
return Ui::Text::Filtered(
|
auto result = Ui::Text::Filtered(
|
||||||
std::move(text),
|
std::move(text),
|
||||||
{
|
{
|
||||||
EntityType::Pre,
|
EntityType::Pre,
|
||||||
|
@ -85,6 +85,15 @@ TextWithEntities DialogsPreviewText(TextWithEntities text) {
|
||||||
EntityType::CustomEmoji,
|
EntityType::CustomEmoji,
|
||||||
EntityType::PlainLink,
|
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 {
|
struct MessageView::LoadingContext {
|
||||||
|
|
Loading…
Add table
Reference in a new issue