Replaced unread voice dot indicator with svg.

Related commit: f4cbbb251f.
This commit is contained in:
23rd
2026-04-23 22:50:10 +03:00
parent fdf75eebf3
commit 3cd2246a51
4 changed files with 50 additions and 21 deletions
@@ -644,20 +644,27 @@ TextWithEntities DropDisallowedCustomEmoji(
if (to->session().premium() || to->isSelf()) {
return text;
}
const auto isLocalIconEmoji = [](const EntityInText &entity) {
return entity.data().startsWith(u"icon-emoji-"_q);
};
const auto channel = to->asMegagroup();
const auto allowSetId = channel ? channel->mgInfo->emojiSet.id : 0;
if (!allowSetId) {
const auto predicate = [&](const EntityInText &entity) {
return (entity.type() == EntityType::CustomEmoji)
&& !isLocalIconEmoji(entity);
};
text.entities.erase(
ranges::remove(
text.entities,
EntityType::CustomEmoji,
&EntityInText::type),
ranges::remove_if(text.entities, predicate),
text.entities.end());
} else {
const auto predicate = [&](const EntityInText &entity) {
if (entity.type() != EntityType::CustomEmoji) {
return false;
}
if (isLocalIconEmoji(entity)) {
return false;
}
if (const auto id = Data::ParseCustomEmojiData(entity.data())) {
const auto document = to->owner().document(id);
if (const auto sticker = document->sticker()) {