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);
|
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);
|
this->container_->begin(width, this->scale_, messageFlags);
|
||||||
|
|
||||||
for (const auto &element : this->message_->elements)
|
for (const auto &element : this->message_->elements)
|
||||||
{
|
{
|
||||||
if (getSettings()->hideModerated &&
|
if (hideModerated && this->message_->flags.has(MessageFlag::Disabled))
|
||||||
this->message_->flags.has(MessageFlag::Disabled))
|
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getSettings()->hideModerationActions &&
|
if (hideModerationActions &&
|
||||||
(this->message_->flags.has(MessageFlag::Timeout) ||
|
(this->message_->flags.has(MessageFlag::Timeout) ||
|
||||||
this->message_->flags.has(MessageFlag::Untimeout)))
|
this->message_->flags.has(MessageFlag::Untimeout)))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getSettings()->hideSimilar &&
|
if (hideSimilar && this->message_->flags.has(MessageFlag::Similar))
|
||||||
this->message_->flags.has(MessageFlag::Similar))
|
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this->renderReplies_ &&
|
if (hideReplies &&
|
||||||
element->getFlags().has(MessageElementFlag::RepliedMessage))
|
element->getFlags().has(MessageElementFlag::RepliedMessage))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
@ -455,9 +458,4 @@ bool MessageLayout::isReplyable() const
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MessageLayout::setRenderReplies(bool render)
|
|
||||||
{
|
|
||||||
this->renderReplies_ = render;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace chatterino
|
} // namespace chatterino
|
||||||
|
|
|
@ -65,7 +65,6 @@ public:
|
||||||
// Misc
|
// Misc
|
||||||
bool isDisabled() const;
|
bool isDisabled() const;
|
||||||
bool isReplyable() const;
|
bool isReplyable() const;
|
||||||
void setRenderReplies(bool render);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// variables
|
// variables
|
||||||
|
@ -73,7 +72,6 @@ private:
|
||||||
std::shared_ptr<MessageLayoutContainer> container_;
|
std::shared_ptr<MessageLayoutContainer> container_;
|
||||||
std::shared_ptr<QPixmap> buffer_{};
|
std::shared_ptr<QPixmap> buffer_{};
|
||||||
bool bufferValid_ = false;
|
bool bufferValid_ = false;
|
||||||
bool renderReplies_ = true;
|
|
||||||
|
|
||||||
int height_ = 0;
|
int height_ = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue