2
0
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:
John Preston
2018-01-14 19:02:25 +03:00
parent 97a9089ebf
commit 7425e80f05
66 changed files with 4463 additions and 3130 deletions

View File

@@ -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;