fixed resub messages

This commit is contained in:
fourtf
2018-06-04 12:23:23 +02:00
parent 04b7cc5ce8
commit 4a2709cbc3
14 changed files with 141 additions and 36 deletions
+14 -1
View File
@@ -21,6 +21,8 @@ SBHighlight Message::getScrollBarHighlight() const
{
if (this->flags & Message::Highlighted) {
return SBHighlight(SBHighlight::Highlight);
} else if (this->flags & Message::Subscription) {
return SBHighlight(SBHighlight::Subscription);
}
return SBHighlight();
}
@@ -39,6 +41,17 @@ MessagePtr Message::createSystemMessage(const QString &text)
return message;
}
MessagePtr Message::createMessage(const QString &text)
{
MessagePtr message(new Message);
message->addElement(new TimestampElement(QTime::currentTime()));
message->addElement(new TextElement(text, MessageElement::Text, MessageColor::Text));
message->searchText = text;
return message;
}
MessagePtr Message::createTimeoutMessage(const QString &username, const QString &durationInSeconds,
const QString &reason, bool multipleTimes)
{
@@ -64,7 +77,7 @@ MessagePtr Message::createTimeoutMessage(const QString &username, const QString
if (reason.length() > 0) {
text.append(": \"");
text.append(util::ParseTagString(reason));
text.append(util::parseTagString(reason));
text.append("\"");
}
text.append(".");