Improve reply popup after thread update (#4923)

Co-authored-by: nerix <nero.9@hotmail.de>
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
iProdigy
2023-11-05 08:25:26 -08:00
committed by GitHub
parent 9dd83b040b
commit 5209e47df1
12 changed files with 177 additions and 59 deletions
+16 -2
View File
@@ -623,15 +623,24 @@ void TwitchMessageBuilder::parseThread()
{
// set references
this->message().replyThread = this->thread_;
this->message().replyParent = this->parent_;
this->thread_->addToThread(this->weakOf());
// enable reply flag
this->message().flags.set(MessageFlag::ReplyMessage);
const auto &threadRoot = this->thread_->root();
MessagePtr threadRoot;
if (!this->parent_)
{
threadRoot = this->thread_->root();
}
else
{
threadRoot = this->parent_;
}
QString usernameText = SharedMessageBuilder::stylizeUsername(
threadRoot->loginName, *threadRoot.get());
threadRoot->loginName, *threadRoot);
this->emplace<ReplyCurveElement>();
@@ -1811,6 +1820,11 @@ void TwitchMessageBuilder::setThread(std::shared_ptr<MessageThread> thread)
this->thread_ = std::move(thread);
}
void TwitchMessageBuilder::setParent(MessagePtr parent)
{
this->parent_ = std::move(parent);
}
void TwitchMessageBuilder::setMessageOffset(int offset)
{
this->messageOffset_ = offset;