mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-20 04:41:51 +03:00
b736355985
The notification cache helps to not display duplicate desktop notifications to the user. Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
28 lines
409 B
C++
28 lines
409 B
C++
#pragma once
|
|
|
|
#include <QSet>
|
|
|
|
namespace OCC {
|
|
|
|
class NotificationCache
|
|
{
|
|
public:
|
|
struct Notification
|
|
{
|
|
QString title;
|
|
QString message;
|
|
};
|
|
|
|
bool contains(const Notification ¬ification) const;
|
|
|
|
void insert(const Notification ¬ification);
|
|
|
|
void clear();
|
|
|
|
private:
|
|
uint calculateKey(const Notification ¬ification) const;
|
|
|
|
|
|
QSet<uint> _notifications;
|
|
};
|
|
}
|