mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
parent
7d4cebbc96
commit
010c061a25
|
@ -152,7 +152,7 @@ void MessageLayout::paint(QPainter &painter, int y, int messageIndex, Selection
|
|||
// painter.drawPixmap(0, y, this->container.width, this->container.getHeight(), *pixmap);
|
||||
|
||||
// draw disabled
|
||||
if (this->message->flags & Message::Disabled) {
|
||||
if (this->message->flags.HasFlag(Message::Disabled)) {
|
||||
painter.fillRect(0, y, pixmap->width(), pixmap->height(), themeManager.messages.disabled);
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
namespace chatterino {
|
||||
namespace messages {
|
||||
|
||||
struct Message {
|
||||
enum MessageFlags : uint16_t {
|
||||
None = 0,
|
||||
|
@ -53,6 +54,7 @@ public:
|
|||
const QString &reason, bool multipleTimes);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<Message> MessagePtr;
|
||||
using MessagePtr = std::shared_ptr<Message>;
|
||||
|
||||
} // namespace messages
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -119,8 +119,9 @@ void IrcMessageHandler::handleClearChatMessage(Communi::IrcMessage *message)
|
|||
|
||||
// disable the messages from the user
|
||||
for (int i = 0; i < snapshotLength; i++) {
|
||||
if (!(snapshot[i]->flags & Message::Timeout) && snapshot[i]->loginName == username) {
|
||||
snapshot[i]->flags &= Message::Disabled;
|
||||
auto &s = snapshot[i];
|
||||
if (!(s->flags & Message::Timeout) && s->loginName == username) {
|
||||
s->flags.EnableFlag(Message::Disabled);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue