2018-06-26 14:09:39 +02:00
|
|
|
#include "messages/Message.hpp"
|
2020-01-25 11:03:10 +01:00
|
|
|
|
|
|
|
#include "Application.hpp"
|
2018-06-26 14:09:39 +02:00
|
|
|
#include "MessageElement.hpp"
|
|
|
|
#include "providers/twitch/PubsubActions.hpp"
|
2020-01-25 11:03:10 +01:00
|
|
|
#include "singletons/Theme.hpp"
|
2018-08-07 01:35:24 +02:00
|
|
|
#include "util/DebugCount.hpp"
|
2018-06-26 14:09:39 +02:00
|
|
|
#include "util/IrcHelpers.hpp"
|
2017-06-07 10:09:24 +02:00
|
|
|
|
2018-06-26 17:06:17 +02:00
|
|
|
using SBHighlight = chatterino::ScrollbarHighlight;
|
2018-01-06 03:48:56 +01:00
|
|
|
|
2017-04-14 17:52:22 +02:00
|
|
|
namespace chatterino {
|
2018-06-19 22:02:51 +02:00
|
|
|
|
2018-08-07 01:35:24 +02:00
|
|
|
Message::Message()
|
|
|
|
: parseTime(QTime::currentTime())
|
2017-04-12 17:46:44 +02:00
|
|
|
{
|
2018-08-07 01:35:24 +02:00
|
|
|
DebugCount::increase("messages");
|
2017-04-12 17:46:44 +02:00
|
|
|
}
|
2017-01-07 20:43:55 +01:00
|
|
|
|
2018-08-07 01:35:24 +02:00
|
|
|
Message::~Message()
|
2017-04-12 17:46:44 +02:00
|
|
|
{
|
2018-08-07 01:35:24 +02:00
|
|
|
DebugCount::decrease("messages");
|
2017-04-12 17:46:44 +02:00
|
|
|
}
|
2017-01-07 20:43:55 +01:00
|
|
|
|
2018-01-06 03:48:56 +01:00
|
|
|
SBHighlight Message::getScrollBarHighlight() const
|
|
|
|
{
|
2019-07-14 16:35:32 +02:00
|
|
|
if (this->flags.has(MessageFlag::Highlighted) ||
|
|
|
|
this->flags.has(MessageFlag::HighlightedWhisper))
|
2018-10-21 13:43:02 +02:00
|
|
|
{
|
2020-01-25 11:03:10 +01:00
|
|
|
return SBHighlight(this->highlightColor);
|
2018-10-21 13:43:02 +02:00
|
|
|
}
|
2020-01-25 11:03:10 +01:00
|
|
|
else if (this->flags.has(MessageFlag::Subscription) &&
|
|
|
|
getSettings()->enableSubHighlight)
|
2018-10-21 13:43:02 +02:00
|
|
|
{
|
2020-01-25 11:03:10 +01:00
|
|
|
return SBHighlight(
|
|
|
|
ColorProvider::instance().color(ColorType::Subscription));
|
2018-01-06 03:48:56 +01:00
|
|
|
}
|
|
|
|
return SBHighlight();
|
|
|
|
}
|
|
|
|
|
2018-01-11 20:16:25 +01:00
|
|
|
// Static
|
2018-06-19 22:02:51 +02:00
|
|
|
namespace {
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
2017-04-14 17:52:22 +02:00
|
|
|
} // namespace chatterino
|