mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Fix channel-based popups rewriting messages to file log (#4060)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
parent
4152f0dccb
commit
e8fd49aadb
4 changed files with 26 additions and 5 deletions
|
@ -93,6 +93,7 @@
|
|||
- Bugfix: Fixed non-global FrankerFaceZ emotes from being loaded as global emotes. (#3921)
|
||||
- Bugfix: Fixed trailing spaces from preventing Nicknames from working correctly. (#3946)
|
||||
- Bugfix: Fixed trailing spaces from preventing User Highlights from working correctly. (#4051)
|
||||
- Bugfix: Fixed channel-based popups from rewriting messages to file log (#4060)
|
||||
- Dev: Removed official support for QMake. (#3839, #3883)
|
||||
- Dev: Rewrote LimitedQueue (#3798)
|
||||
- Dev: Overhauled highlight system by moving all checks into a Controller allowing for easier tests. (#3399, #3801, #3835)
|
||||
|
|
|
@ -130,12 +130,19 @@ void ReplyThreadPopup::addMessagesFromThread()
|
|||
this->ui_.threadView->setChannel(virtualChannel);
|
||||
this->ui_.threadView->setSourceChannel(sourceChannel);
|
||||
|
||||
virtualChannel->addMessage(this->thread_->root());
|
||||
auto overrideFlags =
|
||||
boost::optional<MessageFlags>(this->thread_->root()->flags);
|
||||
overrideFlags->set(MessageFlag::DoNotLog);
|
||||
|
||||
virtualChannel->addMessage(this->thread_->root(), overrideFlags);
|
||||
for (const auto &msgRef : this->thread_->replies())
|
||||
{
|
||||
if (auto msg = msgRef.lock())
|
||||
{
|
||||
virtualChannel->addMessage(msg);
|
||||
auto overrideFlags = boost::optional<MessageFlags>(msg->flags);
|
||||
overrideFlags->set(MessageFlag::DoNotLog);
|
||||
|
||||
virtualChannel->addMessage(msg, overrideFlags);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -145,8 +152,12 @@ void ReplyThreadPopup::addMessagesFromThread()
|
|||
[this, virtualChannel](MessagePtr &message, auto) {
|
||||
if (message->replyThread == this->thread_)
|
||||
{
|
||||
auto overrideFlags =
|
||||
boost::optional<MessageFlags>(message->flags);
|
||||
overrideFlags->set(MessageFlag::DoNotLog);
|
||||
|
||||
// same reply thread, add message
|
||||
virtualChannel->addMessage(message);
|
||||
virtualChannel->addMessage(message, overrideFlags);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -105,9 +105,13 @@ namespace {
|
|||
for (size_t i = 0; i < snapshot.size(); i++)
|
||||
{
|
||||
MessagePtr message = snapshot[i];
|
||||
|
||||
auto overrideFlags = boost::optional<MessageFlags>(message->flags);
|
||||
overrideFlags->set(MessageFlag::DoNotLog);
|
||||
|
||||
if (checkMessageUserName(userName, message))
|
||||
{
|
||||
channelPtr->addMessage(message);
|
||||
channelPtr->addMessage(message, overrideFlags);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,12 @@ ChannelPtr SearchPopup::filter(const QString &text, const QString &channelName,
|
|||
|
||||
// If all predicates match, add the message to the channel
|
||||
if (accept)
|
||||
channel->addMessage(message);
|
||||
{
|
||||
auto overrideFlags = boost::optional<MessageFlags>(message->flags);
|
||||
overrideFlags->set(MessageFlag::DoNotLog);
|
||||
|
||||
channel->addMessage(message, overrideFlags);
|
||||
}
|
||||
}
|
||||
|
||||
return channel;
|
||||
|
|
Loading…
Reference in a new issue