mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-05 08:55:59 +00:00
Use HistoryMedia as view, add Data::Media.
This commit is contained in:
@@ -427,13 +427,24 @@ void Manager::notificationReplied(
|
||||
}
|
||||
|
||||
void NativeManager::doShowNotification(HistoryItem *item, int forwardedCount) {
|
||||
auto options = getNotificationOptions(item);
|
||||
const auto options = getNotificationOptions(item);
|
||||
|
||||
QString title = options.hideNameAndPhoto ? qsl("Telegram Desktop") : item->history()->peer->name;
|
||||
QString subtitle = options.hideNameAndPhoto ? QString() : item->notificationHeader();
|
||||
QString text = options.hideMessageText ? lang(lng_notification_preview) : (forwardedCount < 2 ? item->notificationText() : lng_forward_messages(lt_count, forwardedCount));
|
||||
const auto title = options.hideNameAndPhoto ? qsl("Telegram Desktop") : item->history()->peer->name;
|
||||
const auto subtitle = options.hideNameAndPhoto ? QString() : item->notificationHeader();
|
||||
const auto text = options.hideMessageText
|
||||
? lang(lng_notification_preview)
|
||||
: (forwardedCount < 2
|
||||
? item->notificationText()
|
||||
: lng_forward_messages(lt_count, forwardedCount));
|
||||
|
||||
doShowNativeNotification(item->history()->peer, item->id, title, subtitle, text, options.hideNameAndPhoto, options.hideReplyButton);
|
||||
doShowNativeNotification(
|
||||
item->history()->peer,
|
||||
item->id,
|
||||
title,
|
||||
subtitle,
|
||||
text,
|
||||
options.hideNameAndPhoto,
|
||||
options.hideReplyButton);
|
||||
}
|
||||
|
||||
System::~System() = default;
|
||||
|
Reference in New Issue
Block a user