Allow highlights to be excluded from /mentions (#2036)
This commit is contained in:
@@ -16,19 +16,20 @@ QColor HighlightPhrase::FALLBACK_SUB_COLOR = QColor(196, 102, 255, 100);
|
||||
|
||||
bool HighlightPhrase::operator==(const HighlightPhrase &other) const
|
||||
{
|
||||
return std::tie(this->pattern_, this->hasSound_, this->hasAlert_,
|
||||
this->isRegex_, this->isCaseSensitive_, this->soundUrl_,
|
||||
this->color_) == std::tie(other.pattern_, other.hasSound_,
|
||||
other.hasAlert_, other.isRegex_,
|
||||
other.isCaseSensitive_,
|
||||
other.soundUrl_, other.color_);
|
||||
return std::tie(this->pattern_, this->showInMentions_, this->hasSound_,
|
||||
this->hasAlert_, this->isRegex_, this->isCaseSensitive_,
|
||||
this->soundUrl_, this->color_) ==
|
||||
std::tie(other.pattern_, other.showInMentions_, other.hasSound_,
|
||||
other.hasAlert_, other.isRegex_, other.isCaseSensitive_,
|
||||
other.soundUrl_, other.color_);
|
||||
}
|
||||
|
||||
HighlightPhrase::HighlightPhrase(const QString &pattern, bool hasAlert,
|
||||
bool hasSound, bool isRegex,
|
||||
HighlightPhrase::HighlightPhrase(const QString &pattern, bool showInMentions,
|
||||
bool hasAlert, bool hasSound, bool isRegex,
|
||||
bool isCaseSensitive, const QString &soundUrl,
|
||||
QColor color)
|
||||
: pattern_(pattern)
|
||||
, showInMentions_(showInMentions)
|
||||
, hasAlert_(hasAlert)
|
||||
, hasSound_(hasSound)
|
||||
, isRegex_(isRegex)
|
||||
@@ -45,11 +46,12 @@ HighlightPhrase::HighlightPhrase(const QString &pattern, bool hasAlert,
|
||||
this->color_ = std::make_shared<QColor>(color);
|
||||
}
|
||||
|
||||
HighlightPhrase::HighlightPhrase(const QString &pattern, bool hasAlert,
|
||||
bool hasSound, bool isRegex,
|
||||
HighlightPhrase::HighlightPhrase(const QString &pattern, bool showInMentions,
|
||||
bool hasAlert, bool hasSound, bool isRegex,
|
||||
bool isCaseSensitive, const QString &soundUrl,
|
||||
std::shared_ptr<QColor> color)
|
||||
: pattern_(pattern)
|
||||
, showInMentions_(showInMentions)
|
||||
, hasAlert_(hasAlert)
|
||||
, hasSound_(hasSound)
|
||||
, isRegex_(isRegex)
|
||||
@@ -71,6 +73,11 @@ const QString &HighlightPhrase::getPattern() const
|
||||
return this->pattern_;
|
||||
}
|
||||
|
||||
bool HighlightPhrase::showInMentions() const
|
||||
{
|
||||
return this->showInMentions_;
|
||||
}
|
||||
|
||||
bool HighlightPhrase::hasAlert() const
|
||||
{
|
||||
return this->hasAlert_;
|
||||
|
||||
Reference in New Issue
Block a user