diff --git a/Telegram/SourceFiles/history/history_item.cpp b/Telegram/SourceFiles/history/history_item.cpp index 367ae97f8..629fec684 100644 --- a/Telegram/SourceFiles/history/history_item.cpp +++ b/Telegram/SourceFiles/history/history_item.cpp @@ -1029,7 +1029,11 @@ QString HistoryItem::notificationText() const { }(); return (result.size() <= kNotificationTextLimit) ? result - : result.mid(0, kNotificationTextLimit) + qsl("..."); + : TextUtilities::CutTextWithCommands( + result, + kNotificationTextLimit, + textcmdStartSpoiler(), + textcmdStopSpoiler()); } ItemPreview HistoryItem::toPreview(ToPreviewOptions options) const { diff --git a/Telegram/SourceFiles/history/history_service.cpp b/Telegram/SourceFiles/history/history_service.cpp index d097473c4..9c0361e6c 100644 --- a/Telegram/SourceFiles/history/history_service.cpp +++ b/Telegram/SourceFiles/history/history_service.cpp @@ -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 { diff --git a/Telegram/lib_ui b/Telegram/lib_ui index 44853e933..774da18a3 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit 44853e933400a7f1536b9847fd0adc2b7d575bff +Subproject commit 774da18a386e9f0eda71331db22bc8e9b24bf44e