mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Added utility to correctly cut text with commands.
This commit is contained in:
@@ -711,7 +711,11 @@ HistoryService::PreparedText HistoryService::preparePinnedText() {
|
||||
}
|
||||
}
|
||||
if (!limit && cutAt + 5 < size) {
|
||||
original = original.mid(0, cutAt) + qstr("...");
|
||||
original = TextUtilities::CutTextWithCommands(
|
||||
std::move(original),
|
||||
cutAt,
|
||||
textcmdStartSpoiler(),
|
||||
textcmdStopSpoiler());
|
||||
}
|
||||
result.text = tr::lng_action_pinned_message(tr::now, lt_from, fromLinkText(), lt_text, textcmdLink(2, original));
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user