Fix Windows build.
This commit is contained in:
parent
932f21e9bb
commit
969b359a92
|
@ -4,13 +4,16 @@
|
|||
using namespace WinToastLib;
|
||||
|
||||
class CustomHandler : public QObject, public IWinToastHandler {
|
||||
Q_OBJECT
|
||||
public:
|
||||
void toastActivated() { emit activated(notificationID); }
|
||||
void toastActivated(int) { emit activated(notificationID); }
|
||||
void toastFailed() {
|
||||
std::wcout << L"Error showing current toast" << std::endl;
|
||||
}
|
||||
void toastDismissed(WinToastDismissalReason) { emit dismissed(notificationID); }
|
||||
void toastDismissed(WinToastDismissalReason) {
|
||||
emit dismissed(notificationID);
|
||||
}
|
||||
|
||||
uint notificationID;
|
||||
|
||||
|
@ -62,12 +65,10 @@ void NotificationsManager::postNotification(
|
|||
count++;
|
||||
customHandler->notificationID = count;
|
||||
notificationIds[count] = roomEventId{room_id, event_id};
|
||||
connect(customHandler, &CustomHandler::activated, this, [=](uint id) {
|
||||
this->actionInvoked(id, "");
|
||||
});
|
||||
connect(customHandler, &CustomHandler::dismissed, this, [=](uint id) {
|
||||
this->notificationClosed(id, 0);
|
||||
});
|
||||
connect(customHandler, &CustomHandler::activated, this,
|
||||
[=](uint id) { this->actionInvoked(id, ""); });
|
||||
connect(customHandler, &CustomHandler::dismissed, this,
|
||||
[=](uint id) { this->notificationClosed(id, 0); });
|
||||
|
||||
WinToast::instance()->showToast(templ, customHandler);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue