summary refs log tree commit diff
path: root/src/notifications/Manager.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2022-10-13 17:37:28 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2022-10-13 18:19:46 +0200
commit8a4bb32b4a53399d20495bb987ea8bda29427d2a (patch)
tree17006938d1ab2cf59eefa0de974e3a2b53ac76a1 /src/notifications/Manager.cpp
parentEvaluate push rules locally (diff)
downloadnheko-8a4bb32b4a53399d20495bb987ea8bda29427d2a.tar.xz
Add toggle to disable decrypting notifications
Diffstat (limited to 'src/notifications/Manager.cpp')
-rw-r--r--src/notifications/Manager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/notifications/Manager.cpp b/src/notifications/Manager.cpp
index 6033cc6d..ba550530 100644
--- a/src/notifications/Manager.cpp
+++ b/src/notifications/Manager.cpp
@@ -36,18 +36,18 @@ NotificationsManager::getMessageTemplate(const mtx::responses::Notification &not
 }
 
 void
-NotificationsManager::removeNotifications(const QString &roomId,
+NotificationsManager::removeNotifications(const QString &roomId_,
                                           const std::vector<QString> &eventIds)
 {
-    std::string room_id = roomId.toStdString();
+    std::string room_id = roomId_.toStdString();
 
     std::uint64_t markerPos = 0;
     for (const auto &e : eventIds) {
         markerPos = std::max(markerPos, cache::getEventIndex(room_id, e.toStdString()).value_or(0));
     }
 
-    for (const auto &[roomId, eventId] : this->notificationIds) {
-        if (roomId != roomId)
+    for (const auto &[roomId, eventId] : qAsConst(this->notificationIds)) {
+        if (roomId != roomId_)
             continue;
         auto idx = cache::getEventIndex(room_id, eventId.toStdString());
         if (!idx || markerPos >= idx) {