mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fixed crash in translate box for text with spoilers.
This commit is contained in:
parent
92756f418b
commit
fe6ad54836
1 changed files with 6 additions and 0 deletions
|
@ -160,6 +160,12 @@ void TranslateBox(
|
||||||
};
|
};
|
||||||
const auto state = box->lifetime().make_state<State>();
|
const auto state = box->lifetime().make_state<State>();
|
||||||
|
|
||||||
|
text.entities = ranges::views::all(
|
||||||
|
text.entities
|
||||||
|
) | ranges::views::filter([](const EntityInText &e) {
|
||||||
|
return e.type() != EntityType::Spoiler;
|
||||||
|
}) | ranges::to<EntitiesInText>();
|
||||||
|
|
||||||
if (!IsServerMsgId(msgId)) {
|
if (!IsServerMsgId(msgId)) {
|
||||||
msgId = 0;
|
msgId = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue