2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Hide native notification details on lock screen.

This commit is contained in:
John Preston
2021-04-27 13:51:52 +04:00
parent e9196bbbb5
commit e26e666135
7 changed files with 16 additions and 19 deletions

View File

@@ -193,8 +193,8 @@ public:
bool hideMessageText = false;
bool hideReplyButton = false;
};
[[nodiscard]] static DisplayOptions GetNotificationOptions(
HistoryItem *item);
[[nodiscard]] DisplayOptions getNotificationOptions(
HistoryItem *item) const;
[[nodiscard]] QString addTargetAccountName(
const QString &title,
@@ -218,6 +218,9 @@ protected:
virtual void doClearFromItem(not_null<HistoryItem*> item) = 0;
virtual void doClearFromHistory(not_null<History*> history) = 0;
virtual void doClearFromSession(not_null<Main::Session*> session) = 0;
[[nodiscard]] virtual bool forceHideDetails() const {
return false;
}
virtual void onBeforeNotificationActivated(NotificationId id) {
}
virtual void onAfterNotificationActivated(
@@ -256,6 +259,8 @@ protected:
not_null<HistoryItem*> item,
int forwardedCount) override;
bool forceHideDetails() const override;
virtual void doShowNativeNotification(
not_null<PeerData*> peer,
std::shared_ptr<Data::CloudImageView> &userpicView,