fix: clear WinToast on exit (#5728)

This commit is contained in:
pajlada
2024-11-23 15:45:01 +01:00
committed by GitHub
parent a8269a5749
commit b4ff1286c7
3 changed files with 12 additions and 0 deletions
+7
View File
@@ -70,6 +70,13 @@ using WinToastLib::WinToast;
using WinToastLib::WinToastTemplate;
#endif
Toasts::~Toasts()
{
#ifdef Q_OS_WIN
WinToast::instance()->clear();
#endif
}
bool Toasts::isEnabled()
{
#ifdef Q_OS_WIN
+4
View File
@@ -3,6 +3,8 @@
#include <pajlada/settings/setting.hpp>
#include <QString>
#include <cstdint>
namespace chatterino {
enum class Platform : uint8_t;
@@ -17,6 +19,8 @@ enum class ToastReaction {
class Toasts final
{
public:
~Toasts();
void sendChannelNotification(const QString &channelName,
const QString &channelTitle, Platform p);
static QString findStringFromReaction(const ToastReaction &reaction);