From 3c9ee480c0915f379828afcd0d8a5e2b0d293576 Mon Sep 17 00:00:00 2001 From: Felanbird <41973452+Felanbird@users.noreply.github.com> Date: Wed, 20 Oct 2021 07:03:59 -0400 Subject: [PATCH] Fix being unable to disable 'First Message' highlights (#3293) Co-authored-by: pajlada --- CHANGELOG.md | 1 + src/controllers/highlights/HighlightModel.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f214285..e01abe26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ - Bugfix: Fixed second chatterino icon appearing in the dock when restarting on a crash in macOS. (#3268) - Bugfix: Fixed built-in Chatterino commands not working in whispers and mentions special channels (#3288) - Bugfix: Fixed `QCharRef with an index pointing outside the valid range of a QString` warning that was emitted on every Tab press. (#3234) +- Bugfix: Fixed being unable to disable `First Message` highlights (#3293) - Dev: Renamed CMake's build option `USE_SYSTEM_QT5KEYCHAIN` to `USE_SYSTEM_QTKEYCHAIN`. (#3103) - Dev: Add benchmarks that can be compiled with the `BUILD_BENCHMARKS` CMake flag. Off by default. (#3038) diff --git a/src/controllers/highlights/HighlightModel.cpp b/src/controllers/highlights/HighlightModel.cpp index aae88e50..780918d3 100644 --- a/src/controllers/highlights/HighlightModel.cpp +++ b/src/controllers/highlights/HighlightModel.cpp @@ -151,6 +151,7 @@ void HighlightModel::afterInit() this->insertCustomRow(redeemedRow, 3); + // Highlight settings for first messages std::vector firstMessageRow = this->createRow(); setBoolItem(firstMessageRow[Column::Pattern], getSettings()->enableFirstMessageHighlight.getValue(), true, @@ -202,6 +203,11 @@ void HighlightModel::customRowSetData(const std::vector &row, getSettings()->enableRedeemedHighlight.setValue( value.toBool()); } + else if (rowIndex == 4) + { + getSettings()->enableFirstMessageHighlight.setValue( + value.toBool()); + } } } break;