removed access to theme from TMB + misc fixes (#2694)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -51,6 +51,7 @@ public:
|
||||
MessageBuilder(const BanAction &action, uint32_t count = 1);
|
||||
MessageBuilder(const UnbanAction &action);
|
||||
MessageBuilder(const AutomodUserAction &action);
|
||||
virtual ~MessageBuilder() = default;
|
||||
|
||||
Message *operator->();
|
||||
Message &message();
|
||||
|
||||
@@ -107,6 +107,11 @@ void SharedMessageBuilder::parse()
|
||||
{
|
||||
this->parseUsernameColor();
|
||||
|
||||
if (this->action_)
|
||||
{
|
||||
this->textColor_ = this->usernameColor_;
|
||||
}
|
||||
|
||||
this->parseUsername();
|
||||
|
||||
this->message().flags.set(MessageFlag::Collapsed);
|
||||
@@ -408,8 +413,7 @@ void SharedMessageBuilder::addTextOrEmoji(const QString &string_)
|
||||
// Actually just text
|
||||
auto linkString = this->matchLink(string);
|
||||
auto link = Link();
|
||||
auto textColor = this->action_ ? MessageColor(this->usernameColor_)
|
||||
: MessageColor(MessageColor::Text);
|
||||
auto &&textColor = this->textColor_;
|
||||
|
||||
if (linkString.isEmpty())
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "common/Aliases.hpp"
|
||||
#include "common/Outcome.hpp"
|
||||
#include "messages/MessageColor.hpp"
|
||||
|
||||
#include <IrcMessage>
|
||||
#include <QColor>
|
||||
@@ -59,7 +60,8 @@ protected:
|
||||
|
||||
const bool action_{};
|
||||
|
||||
QColor usernameColor_;
|
||||
QColor usernameColor_ = {153, 153, 153};
|
||||
MessageColor textColor_ = MessageColor::Text;
|
||||
|
||||
bool highlightAlert_ = false;
|
||||
bool highlightSound_ = false;
|
||||
|
||||
Reference in New Issue
Block a user