implemented pausing on hover

This commit is contained in:
fourtf
2018-11-03 21:26:57 +01:00
parent 22cf4368bd
commit 5453c65f0f
10 changed files with 395 additions and 304 deletions
+19
View File
@@ -4,6 +4,8 @@
#include "common/Common.hpp"
#include "controllers/accounts/AccountController.hpp"
#include "controllers/highlights/HighlightController.hpp"
#include "messages/Message.hpp"
#include "messages/MessageBuilder.hpp"
#include "providers/twitch/IrcMessageHandler.hpp"
#include "providers/twitch/PubsubClient.hpp"
#include "providers/twitch/TwitchAccount.hpp"
@@ -182,6 +184,23 @@ std::shared_ptr<Channel> TwitchServer::getCustomChannel(
return this->mentionsChannel;
}
if (channelName == "$$$")
{
static auto channel =
std::make_shared<Channel>("$$$", chatterino::Channel::Type::Misc);
static auto timer = [&] {
auto timer = new QTimer;
QObject::connect(timer, &QTimer::timeout, [] {
channel->addMessage(
makeSystemMessage(QTime::currentTime().toString()));
});
timer->start(500);
return timer;
}();
return channel;
}
return nullptr;
}