Temporary fix for timeouts not graying out messages properly

Fix #669
This commit is contained in:
Rasmus Karlsson 2018-09-01 13:43:17 +00:00
parent eb04e1c3df
commit a7487ab43e
2 changed files with 9 additions and 2 deletions

View file

@ -143,7 +143,8 @@ void Channel::addOrReplaceTimeout(MessagePtr message)
if (s->flags.hasNone({MessageFlag::Timeout, MessageFlag::Untimeout}) && if (s->flags.hasNone({MessageFlag::Timeout, MessageFlag::Untimeout}) &&
s->loginName == message->timeoutUser) { s->loginName == message->timeoutUser) {
// FOURTF: disabled for now // FOURTF: disabled for now
// s->flags.EnableFlag(MessageFlag::Disabled); // PAJLADA: Shitty solution described in Message.hpp
s->flags.set(MessageFlag::Disabled);
} }
} }

View file

@ -33,7 +33,13 @@ struct Message : boost::noncopyable {
Message(); Message();
~Message(); ~Message();
MessageFlags flags; // Making this a mutable means that we can update a messages flags,
// while still keeping Message constant. This means that a message's flag
// can be updated without the renderer being made aware, which might be bad.
// This is a temporary effort until we can figure out what the right
// const-correct way to deal with this is.
// This might bring race conditions with it
mutable MessageFlags flags;
QTime parseTime; QTime parseTime;
QString id; QString id;
QString searchText; QString searchText;