Allow highlights to be excluded from /mentions (#2036)

This commit is contained in:
Leon Richardt 2020-10-24 14:33:15 +02:00 committed by GitHub
parent 0049a5ebb2
commit ec94869480
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 99 additions and 40 deletions

View file

@ -25,6 +25,7 @@
- Minor: Bold usernames enabled by default - Minor: Bold usernames enabled by default
- Minor: Improve UX of the "Login expired!" message (#2029) - Minor: Improve UX of the "Login expired!" message (#2029)
- Minor: PageUp and PageDown now scroll in the selected split (#2070, #2081) - Minor: PageUp and PageDown now scroll in the selected split (#2070, #2081)
- Minor: Allow highlights to be excluded from `/mentions`. Excluded highlights will not trigger tab highlights either. (#1793, #2036)
- Bugfix: Fix bug preventing users from setting the highlight color of the second entry in the "User" highlights tab (#1898) - Bugfix: Fix bug preventing users from setting the highlight color of the second entry in the "User" highlights tab (#1898)
- Bugfix: Fix bug where the "check user follow state" event could trigger a network request requesting the user to follow or unfollow a user. By itself its quite harmless as it just repeats to Twitch the same follow state we had, so no follows should have been lost by this but it meant there was a rogue network request that was fired that could cause a crash (#1906) - Bugfix: Fix bug where the "check user follow state" event could trigger a network request requesting the user to follow or unfollow a user. By itself its quite harmless as it just repeats to Twitch the same follow state we had, so no follows should have been lost by this but it meant there was a rogue network request that was fired that could cause a crash (#1906)
- Bugfix: /usercard command will now respect the "Automatically close user popup" setting (#1918) - Bugfix: /usercard command will now respect the "Automatically close user popup" setting (#1918)

View file

@ -9,7 +9,7 @@ namespace chatterino {
// commandmodel // commandmodel
HighlightModel::HighlightModel(QObject *parent) HighlightModel::HighlightModel(QObject *parent)
: SignalVectorModel<HighlightPhrase>(7, parent) : SignalVectorModel<HighlightPhrase>(Column::COUNT, parent)
{ {
} }
@ -25,6 +25,7 @@ HighlightPhrase HighlightModel::getItemFromRow(
return HighlightPhrase{ return HighlightPhrase{
row[Column::Pattern]->data(Qt::DisplayRole).toString(), row[Column::Pattern]->data(Qt::DisplayRole).toString(),
row[Column::ShowInMentions]->data(Qt::DisplayRole).toBool(),
row[Column::FlashTaskbar]->data(Qt::CheckStateRole).toBool(), row[Column::FlashTaskbar]->data(Qt::CheckStateRole).toBool(),
row[Column::PlaySound]->data(Qt::CheckStateRole).toBool(), row[Column::PlaySound]->data(Qt::CheckStateRole).toBool(),
row[Column::UseRegex]->data(Qt::CheckStateRole).toBool(), row[Column::UseRegex]->data(Qt::CheckStateRole).toBool(),
@ -38,6 +39,7 @@ void HighlightModel::getRowFromItem(const HighlightPhrase &item,
std::vector<QStandardItem *> &row) std::vector<QStandardItem *> &row)
{ {
setStringItem(row[Column::Pattern], item.getPattern()); setStringItem(row[Column::Pattern], item.getPattern());
setBoolItem(row[Column::ShowInMentions], item.showInMentions());
setBoolItem(row[Column::FlashTaskbar], item.hasAlert()); setBoolItem(row[Column::FlashTaskbar], item.hasAlert());
setBoolItem(row[Column::PlaySound], item.hasSound()); setBoolItem(row[Column::PlaySound], item.hasSound());
setBoolItem(row[Column::UseRegex], item.isRegex()); setBoolItem(row[Column::UseRegex], item.isRegex());
@ -54,6 +56,9 @@ void HighlightModel::afterInit()
getSettings()->enableSelfHighlight.getValue(), true, false); getSettings()->enableSelfHighlight.getValue(), true, false);
usernameRow[Column::Pattern]->setData("Your username (automatic)", usernameRow[Column::Pattern]->setData("Your username (automatic)",
Qt::DisplayRole); Qt::DisplayRole);
setBoolItem(usernameRow[Column::ShowInMentions],
getSettings()->showSelfHighlightInMentions.getValue(), true,
false);
setBoolItem(usernameRow[Column::FlashTaskbar], setBoolItem(usernameRow[Column::FlashTaskbar],
getSettings()->enableSelfHighlightTaskbar.getValue(), true, getSettings()->enableSelfHighlightTaskbar.getValue(), true,
false); false);
@ -76,6 +81,7 @@ void HighlightModel::afterInit()
setBoolItem(whisperRow[Column::Pattern], setBoolItem(whisperRow[Column::Pattern],
getSettings()->enableWhisperHighlight.getValue(), true, false); getSettings()->enableWhisperHighlight.getValue(), true, false);
whisperRow[Column::Pattern]->setData("Whispers", Qt::DisplayRole); whisperRow[Column::Pattern]->setData("Whispers", Qt::DisplayRole);
whisperRow[Column::ShowInMentions]->setFlags(0); // We have /whispers
setBoolItem(whisperRow[Column::FlashTaskbar], setBoolItem(whisperRow[Column::FlashTaskbar],
getSettings()->enableWhisperHighlightTaskbar.getValue(), true, getSettings()->enableWhisperHighlightTaskbar.getValue(), true,
false); false);
@ -100,6 +106,7 @@ void HighlightModel::afterInit()
setBoolItem(subRow[Column::Pattern], setBoolItem(subRow[Column::Pattern],
getSettings()->enableSubHighlight.getValue(), true, false); getSettings()->enableSubHighlight.getValue(), true, false);
subRow[Column::Pattern]->setData("Subscriptions", Qt::DisplayRole); subRow[Column::Pattern]->setData("Subscriptions", Qt::DisplayRole);
subRow[Column::ShowInMentions]->setFlags(0);
setBoolItem(subRow[Column::FlashTaskbar], setBoolItem(subRow[Column::FlashTaskbar],
getSettings()->enableSubHighlightTaskbar.getValue(), true, getSettings()->enableSubHighlightTaskbar.getValue(), true,
false); false);
@ -122,6 +129,7 @@ void HighlightModel::afterInit()
getSettings()->enableRedeemedHighlight.getValue(), true, false); getSettings()->enableRedeemedHighlight.getValue(), true, false);
redeemedRow[Column::Pattern]->setData( redeemedRow[Column::Pattern]->setData(
"Highlights redeemed with Channel Points", Qt::DisplayRole); "Highlights redeemed with Channel Points", Qt::DisplayRole);
redeemedRow[Column::ShowInMentions]->setFlags(0);
// setBoolItem(redeemedRow[Column::FlashTaskbar], // setBoolItem(redeemedRow[Column::FlashTaskbar],
// getSettings()->enableRedeemedHighlightTaskbar.getValue(), true, // getSettings()->enableRedeemedHighlightTaskbar.getValue(), true,
// false); // false);
@ -174,6 +182,17 @@ void HighlightModel::customRowSetData(const std::vector<QStandardItem *> &row,
} }
} }
break; break;
case Column::ShowInMentions: {
if (role == Qt::CheckStateRole)
{
if (rowIndex == 0)
{
getSettings()->showSelfHighlightInMentions.setValue(
value.toBool());
}
}
}
break;
case Column::FlashTaskbar: { case Column::FlashTaskbar: {
if (role == Qt::CheckStateRole) if (role == Qt::CheckStateRole)
{ {

View file

@ -15,12 +15,14 @@ public:
// Used here, in HighlightingPage and in UserHighlightModel // Used here, in HighlightingPage and in UserHighlightModel
enum Column { enum Column {
Pattern = 0, Pattern = 0,
FlashTaskbar = 1, ShowInMentions = 1,
PlaySound = 2, FlashTaskbar = 2,
UseRegex = 3, PlaySound = 3,
CaseSensitive = 4, UseRegex = 4,
SoundPath = 5, CaseSensitive = 5,
Color = 6 SoundPath = 6,
Color = 7,
COUNT // keep this as last member of enum
}; };
constexpr static int WHISPER_ROW = 1; constexpr static int WHISPER_ROW = 1;

View file

@ -16,19 +16,20 @@ QColor HighlightPhrase::FALLBACK_SUB_COLOR = QColor(196, 102, 255, 100);
bool HighlightPhrase::operator==(const HighlightPhrase &other) const bool HighlightPhrase::operator==(const HighlightPhrase &other) const
{ {
return std::tie(this->pattern_, this->hasSound_, this->hasAlert_, return std::tie(this->pattern_, this->showInMentions_, this->hasSound_,
this->isRegex_, this->isCaseSensitive_, this->soundUrl_, this->hasAlert_, this->isRegex_, this->isCaseSensitive_,
this->color_) == std::tie(other.pattern_, other.hasSound_, this->soundUrl_, this->color_) ==
other.hasAlert_, other.isRegex_, std::tie(other.pattern_, other.showInMentions_, other.hasSound_,
other.isCaseSensitive_, other.hasAlert_, other.isRegex_, other.isCaseSensitive_,
other.soundUrl_, other.color_); other.soundUrl_, other.color_);
} }
HighlightPhrase::HighlightPhrase(const QString &pattern, bool hasAlert, HighlightPhrase::HighlightPhrase(const QString &pattern, bool showInMentions,
bool hasSound, bool isRegex, bool hasAlert, bool hasSound, bool isRegex,
bool isCaseSensitive, const QString &soundUrl, bool isCaseSensitive, const QString &soundUrl,
QColor color) QColor color)
: pattern_(pattern) : pattern_(pattern)
, showInMentions_(showInMentions)
, hasAlert_(hasAlert) , hasAlert_(hasAlert)
, hasSound_(hasSound) , hasSound_(hasSound)
, isRegex_(isRegex) , isRegex_(isRegex)
@ -45,11 +46,12 @@ HighlightPhrase::HighlightPhrase(const QString &pattern, bool hasAlert,
this->color_ = std::make_shared<QColor>(color); this->color_ = std::make_shared<QColor>(color);
} }
HighlightPhrase::HighlightPhrase(const QString &pattern, bool hasAlert, HighlightPhrase::HighlightPhrase(const QString &pattern, bool showInMentions,
bool hasSound, bool isRegex, bool hasAlert, bool hasSound, bool isRegex,
bool isCaseSensitive, const QString &soundUrl, bool isCaseSensitive, const QString &soundUrl,
std::shared_ptr<QColor> color) std::shared_ptr<QColor> color)
: pattern_(pattern) : pattern_(pattern)
, showInMentions_(showInMentions)
, hasAlert_(hasAlert) , hasAlert_(hasAlert)
, hasSound_(hasSound) , hasSound_(hasSound)
, isRegex_(isRegex) , isRegex_(isRegex)
@ -71,6 +73,11 @@ const QString &HighlightPhrase::getPattern() const
return this->pattern_; return this->pattern_;
} }
bool HighlightPhrase::showInMentions() const
{
return this->showInMentions_;
}
bool HighlightPhrase::hasAlert() const bool HighlightPhrase::hasAlert() const
{ {
return this->hasAlert_; return this->hasAlert_;

View file

@ -24,20 +24,21 @@ public:
* *
* Use this constructor when creating a new HighlightPhrase. * Use this constructor when creating a new HighlightPhrase.
*/ */
HighlightPhrase(const QString &pattern, bool hasAlert, bool hasSound, HighlightPhrase(const QString &pattern, bool showInMentions, bool hasAlert,
bool isRegex, bool isCaseSensitive, const QString &soundUrl, bool hasSound, bool isRegex, bool isCaseSensitive,
QColor color); const QString &soundUrl, QColor color);
/** /**
* @brief Create a new HighlightPhrase. * @brief Create a new HighlightPhrase.
* *
* Use this constructor when updating an existing HighlightPhrase's color. * Use this constructor when updating an existing HighlightPhrase's color.
*/ */
HighlightPhrase(const QString &pattern, bool hasAlert, bool hasSound, HighlightPhrase(const QString &pattern, bool showInMentions, bool hasAlert,
bool isRegex, bool isCaseSensitive, const QString &soundUrl, bool hasSound, bool isRegex, bool isCaseSensitive,
std::shared_ptr<QColor> color); const QString &soundUrl, std::shared_ptr<QColor> color);
const QString &getPattern() const; const QString &getPattern() const;
bool showInMentions() const;
bool hasAlert() const; bool hasAlert() const;
/** /**
@ -84,6 +85,7 @@ public:
private: private:
QString pattern_; QString pattern_;
bool showInMentions_;
bool hasAlert_; bool hasAlert_;
bool hasSound_; bool hasSound_;
bool isRegex_; bool isRegex_;
@ -97,6 +99,14 @@ private:
namespace pajlada { namespace pajlada {
namespace {
chatterino::HighlightPhrase constructError()
{
return chatterino::HighlightPhrase(QString(), false, false, false,
false, false, QString(), QColor());
}
} // namespace
template <> template <>
struct Serialize<chatterino::HighlightPhrase> { struct Serialize<chatterino::HighlightPhrase> {
static rapidjson::Value get(const chatterino::HighlightPhrase &value, static rapidjson::Value get(const chatterino::HighlightPhrase &value,
@ -105,6 +115,7 @@ struct Serialize<chatterino::HighlightPhrase> {
rapidjson::Value ret(rapidjson::kObjectType); rapidjson::Value ret(rapidjson::kObjectType);
chatterino::rj::set(ret, "pattern", value.getPattern(), a); chatterino::rj::set(ret, "pattern", value.getPattern(), a);
chatterino::rj::set(ret, "showInMentions", value.showInMentions(), a);
chatterino::rj::set(ret, "alert", value.hasAlert(), a); chatterino::rj::set(ret, "alert", value.hasAlert(), a);
chatterino::rj::set(ret, "sound", value.hasSound(), a); chatterino::rj::set(ret, "sound", value.hasSound(), a);
chatterino::rj::set(ret, "regex", value.isRegex(), a); chatterino::rj::set(ret, "regex", value.isRegex(), a);
@ -123,11 +134,11 @@ struct Deserialize<chatterino::HighlightPhrase> {
{ {
if (!value.IsObject()) if (!value.IsObject())
{ {
return chatterino::HighlightPhrase(QString(), true, false, false, return constructError();
false, "", QColor());
} }
QString _pattern; QString _pattern;
bool _showInMentions = true;
bool _hasAlert = true; bool _hasAlert = true;
bool _hasSound = false; bool _hasSound = false;
bool _isRegex = false; bool _isRegex = false;
@ -136,6 +147,7 @@ struct Deserialize<chatterino::HighlightPhrase> {
QString encodedColor; QString encodedColor;
chatterino::rj::getSafe(value, "pattern", _pattern); chatterino::rj::getSafe(value, "pattern", _pattern);
chatterino::rj::getSafe(value, "showInMentions", _showInMentions);
chatterino::rj::getSafe(value, "alert", _hasAlert); chatterino::rj::getSafe(value, "alert", _hasAlert);
chatterino::rj::getSafe(value, "sound", _hasSound); chatterino::rj::getSafe(value, "sound", _hasSound);
chatterino::rj::getSafe(value, "regex", _isRegex); chatterino::rj::getSafe(value, "regex", _isRegex);
@ -147,9 +159,9 @@ struct Deserialize<chatterino::HighlightPhrase> {
if (!_color.isValid()) if (!_color.isValid())
_color = chatterino::HighlightPhrase::FALLBACK_HIGHLIGHT_COLOR; _color = chatterino::HighlightPhrase::FALLBACK_HIGHLIGHT_COLOR;
return chatterino::HighlightPhrase(_pattern, _hasAlert, _hasSound, return chatterino::HighlightPhrase(_pattern, _showInMentions, _hasAlert,
_isRegex, _isCaseSensitive, _hasSound, _isRegex,
_soundUrl, _color); _isCaseSensitive, _soundUrl, _color);
} }
}; };

View file

@ -7,9 +7,11 @@
namespace chatterino { namespace chatterino {
using Column = HighlightModel::Column;
// commandmodel // commandmodel
UserHighlightModel::UserHighlightModel(QObject *parent) UserHighlightModel::UserHighlightModel(QObject *parent)
: SignalVectorModel<HighlightPhrase>(7, parent) : SignalVectorModel<HighlightPhrase>(Column::COUNT, parent)
{ {
} }
@ -17,8 +19,6 @@ UserHighlightModel::UserHighlightModel(QObject *parent)
HighlightPhrase UserHighlightModel::getItemFromRow( HighlightPhrase UserHighlightModel::getItemFromRow(
std::vector<QStandardItem *> &row, const HighlightPhrase &original) std::vector<QStandardItem *> &row, const HighlightPhrase &original)
{ {
using Column = HighlightModel::Column;
// In order for old messages to update their highlight color, we need to // In order for old messages to update their highlight color, we need to
// update the highlight color here. // update the highlight color here.
auto highlightColor = original.getColor(); auto highlightColor = original.getColor();
@ -27,6 +27,7 @@ HighlightPhrase UserHighlightModel::getItemFromRow(
return HighlightPhrase{ return HighlightPhrase{
row[Column::Pattern]->data(Qt::DisplayRole).toString(), row[Column::Pattern]->data(Qt::DisplayRole).toString(),
row[Column::ShowInMentions]->data(Qt::CheckStateRole).toBool(),
row[Column::FlashTaskbar]->data(Qt::CheckStateRole).toBool(), row[Column::FlashTaskbar]->data(Qt::CheckStateRole).toBool(),
row[Column::PlaySound]->data(Qt::CheckStateRole).toBool(), row[Column::PlaySound]->data(Qt::CheckStateRole).toBool(),
row[Column::UseRegex]->data(Qt::CheckStateRole).toBool(), row[Column::UseRegex]->data(Qt::CheckStateRole).toBool(),
@ -39,9 +40,8 @@ HighlightPhrase UserHighlightModel::getItemFromRow(
void UserHighlightModel::getRowFromItem(const HighlightPhrase &item, void UserHighlightModel::getRowFromItem(const HighlightPhrase &item,
std::vector<QStandardItem *> &row) std::vector<QStandardItem *> &row)
{ {
using Column = HighlightModel::Column;
setStringItem(row[Column::Pattern], item.getPattern()); setStringItem(row[Column::Pattern], item.getPattern());
setBoolItem(row[Column::ShowInMentions], item.showInMentions());
setBoolItem(row[Column::FlashTaskbar], item.hasAlert()); setBoolItem(row[Column::FlashTaskbar], item.hasAlert());
setBoolItem(row[Column::PlaySound], item.hasSound()); setBoolItem(row[Column::PlaySound], item.hasSound());
setBoolItem(row[Column::UseRegex], item.isRegex()); setBoolItem(row[Column::UseRegex], item.isRegex());

View file

@ -37,6 +37,7 @@ enum class MessageFlag : uint32_t {
Similar = (1 << 19), Similar = (1 << 19),
RedeemedHighlight = (1 << 20), RedeemedHighlight = (1 << 20),
RedeemedChannelPointReward = (1 << 21), RedeemedChannelPointReward = (1 << 21),
ShowInMentions = (1 << 22),
}; };
using MessageFlags = FlagsEnum<MessageFlag>; using MessageFlags = FlagsEnum<MessageFlag>;

View file

@ -208,6 +208,11 @@ void SharedMessageBuilder::parseHighlights()
this->message().flags.set(MessageFlag::Highlighted); this->message().flags.set(MessageFlag::Highlighted);
this->message().highlightColor = userHighlight.getColor(); this->message().highlightColor = userHighlight.getColor();
if (userHighlight.showInMentions())
{
this->message().flags.set(MessageFlag::ShowInMentions);
}
if (userHighlight.hasAlert()) if (userHighlight.hasAlert())
{ {
this->highlightAlert_ = true; this->highlightAlert_ = true;
@ -252,7 +257,8 @@ void SharedMessageBuilder::parseHighlights()
if (getSettings()->enableSelfHighlight && currentUsername.size() > 0) if (getSettings()->enableSelfHighlight && currentUsername.size() > 0)
{ {
HighlightPhrase selfHighlight( HighlightPhrase selfHighlight(
currentUsername, getSettings()->enableSelfHighlightTaskbar, currentUsername, getSettings()->showSelfHighlightInMentions,
getSettings()->enableSelfHighlightTaskbar,
getSettings()->enableSelfHighlightSound, false, false, getSettings()->enableSelfHighlightSound, false, false,
getSettings()->selfHighlightSoundUrl.getValue(), getSettings()->selfHighlightSoundUrl.getValue(),
ColorProvider::instance().color(ColorType::SelfHighlight)); ColorProvider::instance().color(ColorType::SelfHighlight));
@ -270,6 +276,11 @@ void SharedMessageBuilder::parseHighlights()
this->message().flags.set(MessageFlag::Highlighted); this->message().flags.set(MessageFlag::Highlighted);
this->message().highlightColor = highlight.getColor(); this->message().highlightColor = highlight.getColor();
if (highlight.showInMentions())
{
this->message().flags.set(MessageFlag::ShowInMentions);
}
if (highlight.hasAlert()) if (highlight.hasAlert())
{ {
this->highlightAlert_ = true; this->highlightAlert_ = true;

View file

@ -261,11 +261,12 @@ void IrcMessageHandler::addMessage(Communi::IrcMessage *_message,
builder.triggerHighlights(); builder.triggerHighlights();
} }
auto highlighted = msg->flags.has(MessageFlag::Highlighted); const auto highlighted = msg->flags.has(MessageFlag::Highlighted);
const auto showInMentions = msg->flags.has(MessageFlag::ShowInMentions);
if (!isSub) if (!isSub)
{ {
if (highlighted) if (highlighted && showInMentions)
{ {
server.mentionsChannel->addMessage(msg); server.mentionsChannel->addMessage(msg);
} }

View file

@ -213,6 +213,8 @@ public:
BoolSetting enableSelfHighlight = { BoolSetting enableSelfHighlight = {
"/highlighting/selfHighlight/nameIsHighlightKeyword", true}; "/highlighting/selfHighlight/nameIsHighlightKeyword", true};
BoolSetting showSelfHighlightInMentions = {
"/highlighting/selfHighlight/showSelfHighlightInMentions", true};
BoolSetting enableSelfHighlightSound = { BoolSetting enableSelfHighlightSound = {
"/highlighting/selfHighlight/enableSound", true}; "/highlighting/selfHighlight/enableSound", true};
BoolSetting enableSelfHighlightTaskbar = { BoolSetting enableSelfHighlightTaskbar = {

View file

@ -788,6 +788,7 @@ void ChannelView::messageAppended(MessagePtr &message,
if (!messageFlags->has(MessageFlag::DoNotTriggerNotification)) if (!messageFlags->has(MessageFlag::DoNotTriggerNotification))
{ {
if (messageFlags->has(MessageFlag::Highlighted) && if (messageFlags->has(MessageFlag::Highlighted) &&
messageFlags->has(MessageFlag::ShowInMentions) &&
!messageFlags->has(MessageFlag::Subscription)) !messageFlags->has(MessageFlag::Subscription))
{ {
this->tabHighlightRequested.invoke(HighlightState::Highlighted); this->tabHighlightRequested.invoke(HighlightState::Highlighted);

View file

@ -55,7 +55,8 @@ HighlightingPage::HighlightingPage()
&getSettings()->highlightedMessages)) &getSettings()->highlightedMessages))
.getElement(); .getElement();
view->addRegexHelpLink(); view->addRegexHelpLink();
view->setTitles({"Pattern", "Flash\ntaskbar", "Play\nsound", view->setTitles({"Pattern", "Show in\nMentions",
"Flash\ntaskbar", "Play\nsound",
"Enable\nregex", "Case-\nsensitive", "Enable\nregex", "Case-\nsensitive",
"Custom\nsound", "Color"}); "Custom\nsound", "Color"});
view->getTableView()->horizontalHeader()->setSectionResizeMode( view->getTableView()->horizontalHeader()->setSectionResizeMode(
@ -72,7 +73,7 @@ HighlightingPage::HighlightingPage()
view->addButtonPressed.connect([] { view->addButtonPressed.connect([] {
getSettings()->highlightedMessages.append(HighlightPhrase{ getSettings()->highlightedMessages.append(HighlightPhrase{
"my phrase", true, false, false, false, "", "my phrase", true, true, false, false, false, "",
*ColorProvider::instance().color( *ColorProvider::instance().color(
ColorType::SelfHighlight)}); ColorType::SelfHighlight)});
}); });
@ -102,7 +103,8 @@ HighlightingPage::HighlightingPage()
// Case-sensitivity doesn't make sense for user names so it is // Case-sensitivity doesn't make sense for user names so it is
// set to "false" by default & the column is hidden // set to "false" by default & the column is hidden
view->setTitles({"Username", "Flash\ntaskbar", "Play\nsound", view->setTitles({"Username", "Show in\nMentions",
"Flash\ntaskbar", "Play\nsound",
"Enable\nregex", "Case-\nsensitive", "Enable\nregex", "Case-\nsensitive",
"Custom\nsound", "Color"}); "Custom\nsound", "Color"});
view->getTableView()->horizontalHeader()->setSectionResizeMode( view->getTableView()->horizontalHeader()->setSectionResizeMode(
@ -119,7 +121,7 @@ HighlightingPage::HighlightingPage()
view->addButtonPressed.connect([] { view->addButtonPressed.connect([] {
getSettings()->highlightedUsers.append(HighlightPhrase{ getSettings()->highlightedUsers.append(HighlightPhrase{
"highlighted user", true, false, false, false, "", "highlighted user", true, true, false, false, false, "",
*ColorProvider::instance().color( *ColorProvider::instance().color(
ColorType::SelfHighlight)}); ColorType::SelfHighlight)});
}); });