feat: add Linux support for Live Notifications toasts w/ libnotify (#5881)
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "common/Env.hpp"
|
||||
#include "common/Literals.hpp"
|
||||
#include "controllers/commands/CommandContext.hpp"
|
||||
#include "controllers/notifications/NotificationController.hpp"
|
||||
#include "messages/Image.hpp"
|
||||
#include "messages/Message.hpp"
|
||||
#include "messages/MessageBuilder.hpp"
|
||||
@@ -13,6 +14,7 @@
|
||||
#include "providers/twitch/TwitchChannel.hpp"
|
||||
#include "providers/twitch/TwitchIrcServer.hpp"
|
||||
#include "singletons/Theme.hpp"
|
||||
#include "singletons/Toasts.hpp"
|
||||
#include "util/PostToThread.hpp"
|
||||
|
||||
#include <QApplication>
|
||||
@@ -180,6 +182,15 @@ QString debugTest(const CommandContext &ctx)
|
||||
.arg(nowMillis);
|
||||
getApp()->getTwitch()->addFakeMessage(ircText);
|
||||
}
|
||||
else if (command == "desktop-notify")
|
||||
{
|
||||
auto title = ctx.twitchChannel->accessStreamStatus()->title;
|
||||
|
||||
getApp()->getToasts()->sendChannelNotification(
|
||||
ctx.twitchChannel->getName(), title, Platform::Twitch);
|
||||
ctx.channel->addSystemMessage(
|
||||
QString("debug-test sent desktop notification"));
|
||||
}
|
||||
else
|
||||
{
|
||||
ctx.channel->addSystemMessage(
|
||||
|
||||
Reference in New Issue
Block a user