mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Fix Reply Text Showing In Reply Thread Popup (#4101)
This commit is contained in:
parent
1098be1286
commit
36402a2faf
2 changed files with 9 additions and 13 deletions
|
@ -134,30 +134,33 @@ void MessageLayout::actuallyLayout(int width, MessageElementFlags flags)
|
|||
messageFlags.unset(MessageFlag::Collapsed);
|
||||
}
|
||||
|
||||
bool hideModerated = getSettings()->hideModerated;
|
||||
bool hideModerationActions = getSettings()->hideModerationActions;
|
||||
bool hideSimilar = getSettings()->hideSimilar;
|
||||
bool hideReplies = !flags.has(MessageElementFlag::RepliedMessage);
|
||||
|
||||
this->container_->begin(width, this->scale_, messageFlags);
|
||||
|
||||
for (const auto &element : this->message_->elements)
|
||||
{
|
||||
if (getSettings()->hideModerated &&
|
||||
this->message_->flags.has(MessageFlag::Disabled))
|
||||
if (hideModerated && this->message_->flags.has(MessageFlag::Disabled))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (getSettings()->hideModerationActions &&
|
||||
if (hideModerationActions &&
|
||||
(this->message_->flags.has(MessageFlag::Timeout) ||
|
||||
this->message_->flags.has(MessageFlag::Untimeout)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (getSettings()->hideSimilar &&
|
||||
this->message_->flags.has(MessageFlag::Similar))
|
||||
if (hideSimilar && this->message_->flags.has(MessageFlag::Similar))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!this->renderReplies_ &&
|
||||
if (hideReplies &&
|
||||
element->getFlags().has(MessageElementFlag::RepliedMessage))
|
||||
{
|
||||
continue;
|
||||
|
@ -455,9 +458,4 @@ bool MessageLayout::isReplyable() const
|
|||
return true;
|
||||
}
|
||||
|
||||
void MessageLayout::setRenderReplies(bool render)
|
||||
{
|
||||
this->renderReplies_ = render;
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -65,7 +65,6 @@ public:
|
|||
// Misc
|
||||
bool isDisabled() const;
|
||||
bool isReplyable() const;
|
||||
void setRenderReplies(bool render);
|
||||
|
||||
private:
|
||||
// variables
|
||||
|
@ -73,7 +72,6 @@ private:
|
|||
std::shared_ptr<MessageLayoutContainer> container_;
|
||||
std::shared_ptr<QPixmap> buffer_{};
|
||||
bool bufferValid_ = false;
|
||||
bool renderReplies_ = true;
|
||||
|
||||
int height_ = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue