mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Provided spoiler info to notification text.
This commit is contained in:
parent
90dedb7b70
commit
a027a02130
2 changed files with 7 additions and 4 deletions
|
@ -534,7 +534,7 @@ bool MediaPhoto::replyPreviewLoaded() const {
|
|||
QString MediaPhoto::notificationText() const {
|
||||
return WithCaptionNotificationText(
|
||||
tr::lng_in_dlg_photo(tr::now),
|
||||
parent()->originalText().text);
|
||||
TextUtilities::TextWithSpoilerCommands(parent()->originalText()));
|
||||
}
|
||||
|
||||
ItemPreview MediaPhoto::toPreview(ToPreviewOptions options) const {
|
||||
|
@ -814,7 +814,9 @@ QString MediaFile::notificationText() const {
|
|||
}
|
||||
return tr::lng_in_dlg_file(tr::now);
|
||||
}();
|
||||
return WithCaptionNotificationText(type, parent()->originalText().text);
|
||||
return WithCaptionNotificationText(
|
||||
type,
|
||||
TextUtilities::TextWithSpoilerCommands(parent()->originalText()));
|
||||
}
|
||||
|
||||
QString MediaFile::pinnedTextSubstring() const {
|
||||
|
@ -1307,7 +1309,7 @@ ItemPreview MediaWebPage::toPreview(ToPreviewOptions options) const {
|
|||
}
|
||||
|
||||
QString MediaWebPage::notificationText() const {
|
||||
return parent()->originalText().text;
|
||||
return TextUtilities::TextWithSpoilerCommands(parent()->originalText());
|
||||
}
|
||||
|
||||
QString MediaWebPage::pinnedTextSubstring() const {
|
||||
|
|
|
@ -1022,7 +1022,8 @@ QString HistoryItem::notificationText() const {
|
|||
if (_media && !isService()) {
|
||||
return _media->notificationText();
|
||||
} else if (!emptyText()) {
|
||||
return _text.toString();
|
||||
return TextUtilities::TextWithSpoilerCommands(
|
||||
_text.toTextWithEntities());
|
||||
}
|
||||
return QString();
|
||||
}();
|
||||
|
|
Loading…
Add table
Reference in a new issue