From d1eb35197546a491ce3503c7c2582980e90b6c52 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Wed, 21 Aug 2024 00:14:34 +0200 Subject: Allow loading image only after explicit interactions --- src/notifications/ManagerMac.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/notifications/ManagerMac.cpp') diff --git a/src/notifications/ManagerMac.cpp b/src/notifications/ManagerMac.cpp index ee5639e4..03b2480d 100644 --- a/src/notifications/ManagerMac.cpp +++ b/src/notifications/ManagerMac.cpp @@ -93,7 +93,9 @@ NotificationsManager::postNotification(const mtx::responses::Notification ¬if } else { const QString messageInfo = (isReply ? tr("%1 replied to a message") : tr("%1 sent a message")).arg(sender); - if (mtx::accessors::msg_type(notification.event) == mtx::events::MessageType::Image) + if (allowShowingImages(notification) && + (mtx::accessors::msg_type(notification.event) == mtx::events::MessageType::Image || + mtx::accessors::event_type(notification.event) == mtx::events::EventType::Sticker)) MxcImageProvider::download( QString::fromStdString(mtx::accessors::url(notification.event)).remove("mxc://"), QSize(200, 80), -- cgit 1.5.1