remove notifications

This commit is contained in:
2025-10-21 23:35:11 +02:00
parent 4112efd60b
commit 5ddd38e5d7
5 changed files with 55 additions and 0 deletions

View File

@@ -195,6 +195,23 @@ public:
++revisionCounter;
}
void removeById(std::uint64_t id) override {
if (id == 0)
return;
std::lock_guard<std::mutex> lock(mutex);
bool removed = false;
for (auto it = entries.begin(); it != entries.end();) {
if (it->id == id) {
it = entries.erase(it);
removed = true;
} else {
++it;
}
}
if (removed)
++revisionCounter;
}
void removeByExternalId(std::uint64_t externalId) override {
if (externalId == 0)
return;