temp stuff
This commit is contained in:
@@ -14,10 +14,12 @@
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
/*
|
||||
Toasts::Toasts()
|
||||
{
|
||||
}
|
||||
|
||||
*/
|
||||
/*
|
||||
void Toasts::initialize(Settings &settings, Paths &paths)
|
||||
{
|
||||
getApp()->twitch2->forEachChannel([this](ChannelPtr chn) {
|
||||
@@ -67,12 +69,12 @@ bool Toasts::wasChannelLive(const QString &channelName)
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Toasts::sendChannelNotification(const QString &channelName)
|
||||
*/
|
||||
void Toasts::sendChannelNotification(const QString &channelName, int &platform)
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
if (WinToastLib::WinToast::isCompatible()) {
|
||||
sendWindowsNotification(channelName);
|
||||
sendWindowsNotification(channelName, platform);
|
||||
}
|
||||
#endif
|
||||
// OSX
|
||||
@@ -125,7 +127,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
void Toasts::sendWindowsNotification(const QString &channelName)
|
||||
void Toasts::sendWindowsNotification(const QString &channelName, int &platform)
|
||||
{
|
||||
WinToastLib::WinToastTemplate templ = WinToastLib::WinToastTemplate(
|
||||
WinToastLib::WinToastTemplate::ImageAndText02);
|
||||
|
||||
@@ -3,17 +3,23 @@
|
||||
#include "Application.hpp"
|
||||
#include "common/Singleton.hpp"
|
||||
|
||||
#include <mutex>
|
||||
//#include <mutex>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
class Toasts final : public Singleton
|
||||
{
|
||||
public:
|
||||
void sendChannelNotification(const QString &channelName, int &platform);
|
||||
bool isEnabled(const QString &channelName);
|
||||
/*
|
||||
Toasts();
|
||||
virtual void initialize(Settings &settings, Paths &paths) override final;
|
||||
*/
|
||||
|
||||
private:
|
||||
void sendWindowsNotification(const QString &channelName, int &platform);
|
||||
/*
|
||||
void updateLiveChannels(const QString &channelName);
|
||||
void removeFromLiveChannels(const QString &channelName);
|
||||
|
||||
@@ -24,5 +30,6 @@ private:
|
||||
void sendWindowsNotification(const QString &channelName);
|
||||
std::vector<QString> liveChannels;
|
||||
std::mutex mutex_;
|
||||
*/
|
||||
};
|
||||
} // namespace chatterino
|
||||
|
||||
Reference in New Issue
Block a user