mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Notify about published scheduled messages.
This commit is contained in:
@@ -304,7 +304,14 @@ public:
|
||||
|
||||
void init(Manager *manager);
|
||||
|
||||
void showNotification(PeerData *peer, MsgId msgId, const QString &title, const QString &subtitle, const QString &msg, bool hideNameAndPhoto, bool hideReplyButton);
|
||||
void showNotification(
|
||||
not_null<PeerData*> peer,
|
||||
MsgId msgId,
|
||||
const QString &title,
|
||||
const QString &subtitle,
|
||||
const QString &msg,
|
||||
bool hideNameAndPhoto,
|
||||
bool hideReplyButton);
|
||||
void clearAll();
|
||||
void clearFromHistory(History *history);
|
||||
void clearNotification(PeerId peerId, MsgId msgId);
|
||||
@@ -384,7 +391,14 @@ QString Manager::Private::escapeNotificationText(const QString &text) const {
|
||||
return _markupSupported ? escapeHtml(text) : text;
|
||||
}
|
||||
|
||||
void Manager::Private::showNotification(PeerData *peer, MsgId msgId, const QString &title, const QString &subtitle, const QString &msg, bool hideNameAndPhoto, bool hideReplyButton) {
|
||||
void Manager::Private::showNotification(
|
||||
not_null<PeerData*> peer,
|
||||
MsgId msgId,
|
||||
const QString &title,
|
||||
const QString &subtitle,
|
||||
const QString &msg,
|
||||
bool hideNameAndPhoto,
|
||||
bool hideReplyButton) {
|
||||
auto titleText = escapeNotificationText(title);
|
||||
auto subtitleText = escapeNotificationText(subtitle);
|
||||
auto msgText = escapeNotificationText(msg);
|
||||
@@ -537,8 +551,22 @@ bool Manager::hasActionsSupport() const {
|
||||
|
||||
Manager::~Manager() = default;
|
||||
|
||||
void Manager::doShowNativeNotification(PeerData *peer, MsgId msgId, const QString &title, const QString &subtitle, const QString &msg, bool hideNameAndPhoto, bool hideReplyButton) {
|
||||
_private->showNotification(peer, msgId, title, subtitle, msg, hideNameAndPhoto, hideReplyButton);
|
||||
void Manager::doShowNativeNotification(
|
||||
not_null<PeerData*> peer,
|
||||
MsgId msgId,
|
||||
const QString &title,
|
||||
const QString &subtitle,
|
||||
const QString &msg,
|
||||
bool hideNameAndPhoto,
|
||||
bool hideReplyButton) {
|
||||
_private->showNotification(
|
||||
peer,
|
||||
msgId,
|
||||
title,
|
||||
subtitle,
|
||||
msg,
|
||||
hideNameAndPhoto,
|
||||
hideReplyButton);
|
||||
}
|
||||
|
||||
void Manager::doClearAllFast() {
|
||||
|
@@ -36,7 +36,14 @@ public:
|
||||
~Manager();
|
||||
|
||||
protected:
|
||||
void doShowNativeNotification(PeerData *peer, MsgId msgId, const QString &title, const QString &subtitle, const QString &msg, bool hideNameAndPhoto, bool hideReplyButton) override;
|
||||
void doShowNativeNotification(
|
||||
not_null<PeerData*> peer,
|
||||
MsgId msgId,
|
||||
const QString &title,
|
||||
const QString &subtitle,
|
||||
const QString &msg,
|
||||
bool hideNameAndPhoto,
|
||||
bool hideReplyButton) override;
|
||||
void doClearAllFast() override;
|
||||
void doClearFromHistory(History *history) override;
|
||||
|
||||
|
Reference in New Issue
Block a user