mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 23:27:09 +02:00
Fix pinned message of self-destruct media.
This commit is contained in:
parent
06ee21041d
commit
793ec84098
1 changed files with 7 additions and 0 deletions
|
@ -424,8 +424,15 @@ HistoryService::PreparedText HistoryService::preparePinnedText() {
|
|||
auto pinned = Get<HistoryServicePinned>();
|
||||
if (pinned && pinned->msg) {
|
||||
const auto mediaText = [&] {
|
||||
using TTL = HistoryServiceSelfDestruct;
|
||||
if (const auto media = pinned->msg->media()) {
|
||||
return media->pinnedTextSubstring();
|
||||
} else if (const auto selfdestruct = pinned->msg->Get<TTL>()) {
|
||||
if (selfdestruct->type == TTL::Type::Photo) {
|
||||
return tr::lng_action_pinned_media_photo(tr::now);
|
||||
} else if (selfdestruct->type == TTL::Type::Video) {
|
||||
return tr::lng_action_pinned_media_video(tr::now);
|
||||
}
|
||||
}
|
||||
return QString();
|
||||
}();
|
||||
|
|
Loading…
Add table
Reference in a new issue