mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
d725155569
Inline whispers will be displayed with highlighted background color. New Flag needed to differentiate between normal whisper (highlighted) and whisper with mention.
42 lines
859 B
C++
42 lines
859 B
C++
#include "messages/Message.hpp"
|
|
#include "MessageElement.hpp"
|
|
#include "providers/twitch/PubsubActions.hpp"
|
|
#include "util/DebugCount.hpp"
|
|
#include "util/IrcHelpers.hpp"
|
|
|
|
using SBHighlight = chatterino::ScrollbarHighlight;
|
|
|
|
namespace chatterino {
|
|
|
|
Message::Message()
|
|
: parseTime(QTime::currentTime())
|
|
{
|
|
DebugCount::increase("messages");
|
|
}
|
|
|
|
Message::~Message()
|
|
{
|
|
DebugCount::decrease("messages");
|
|
}
|
|
|
|
SBHighlight Message::getScrollBarHighlight() const
|
|
{
|
|
if (this->flags.has(MessageFlag::Highlighted) ||
|
|
this->flags.has(MessageFlag::HighlightedWhisper))
|
|
{
|
|
return SBHighlight(SBHighlight::Highlight);
|
|
}
|
|
else if (this->flags.has(MessageFlag::Subscription))
|
|
{
|
|
return SBHighlight(SBHighlight::Subscription);
|
|
}
|
|
return SBHighlight();
|
|
}
|
|
|
|
// Static
|
|
namespace {
|
|
|
|
} // namespace
|
|
|
|
} // namespace chatterino
|