refactor: Remove Leading Mention in Replies and Highlight Participated Threads (#4047)

This commit is contained in:
nerix
2022-10-08 16:25:32 +02:00
committed by GitHub
parent 29272e130a
commit 4e2da540d2
19 changed files with 286 additions and 20 deletions
@@ -999,8 +999,10 @@ void TwitchMessageBuilder::appendTwitchEmote(
return;
}
auto start = correctPositions[coords.at(0).toUInt()];
auto end = correctPositions[coords.at(1).toUInt()];
auto start =
correctPositions[coords.at(0).toUInt() - this->messageOffset_];
auto end =
correctPositions[coords.at(1).toUInt() - this->messageOffset_];
if (start >= end || start < 0 || end > this->originalMessage_.length())
{
@@ -1589,4 +1591,9 @@ void TwitchMessageBuilder::setThread(std::shared_ptr<MessageThread> thread)
this->thread_ = std::move(thread);
}
void TwitchMessageBuilder::setMessageOffset(int offset)
{
this->messageOffset_ = offset;
}
} // namespace chatterino