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
@@ -47,6 +47,7 @@ public:
MessagePtr build() override;
void setThread(std::shared_ptr<MessageThread> thread);
void setMessageOffset(int offset);
static void appendChannelPointRewardMessage(
const ChannelPointReward &reward, MessageBuilder *builder, bool isMod,
@@ -110,6 +111,18 @@ private:
bool historicalMessage_ = false;
std::shared_ptr<MessageThread> thread_;
/**
* Starting offset to be used on index-based operations on `originalMessage_`.
*
* For example:
* originalMessage_ = "there"
* messageOffset_ = 4
* (the irc message is "hey there")
*
* then the index 6 would resolve to 6 - 4 = 2 => 'e'
*/
int messageOffset_ = 0;
QString userId_;
bool senderIsBroadcaster{};
};