From f33cc884b2761dd9d1337a77c6ab858cd81f361a Mon Sep 17 00:00:00 2001 From: apa420 <17131426+apa420@users.noreply.github.com> Date: Mon, 16 Jul 2018 17:09:29 +0200 Subject: [PATCH] Fixed issue with Excluded users not saving from the highlights tab (#624) --- src/controllers/highlights/HighlightController.cpp | 7 +++++++ src/controllers/highlights/HighlightController.hpp | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/controllers/highlights/HighlightController.cpp b/src/controllers/highlights/HighlightController.cpp index 02c420c79..04aac6603 100644 --- a/src/controllers/highlights/HighlightController.cpp +++ b/src/controllers/highlights/HighlightController.cpp @@ -24,6 +24,13 @@ void HighlightController::initialize(Application &app) this->phrases.delayedItemsChanged.connect([this] { // this->highlightsSetting_.setValue(this->phrases.getVector()); }); + + for (const HighlightBlacklistUser &blacklistedUser : this->blacklistSetting_.getValue()) { + this->blacklistedUsers.appendItem(blacklistedUser); + } + + this->blacklistedUsers.delayedItemsChanged.connect( + [this] { this->blacklistSetting_.setValue(this->blacklistedUsers.getVector()); }); } HighlightModel *HighlightController::createModel(QObject *parent) diff --git a/src/controllers/highlights/HighlightController.hpp b/src/controllers/highlights/HighlightController.hpp index a881499cf..80a1f7564 100644 --- a/src/controllers/highlights/HighlightController.hpp +++ b/src/controllers/highlights/HighlightController.hpp @@ -39,7 +39,8 @@ private: ChatterinoSetting> highlightsSetting_ = { "/highlighting/highlights"}; - ChatterinoSetting> blacklistSetting_ = {"/highlighting/blacklist"}; + ChatterinoSetting> blacklistSetting_ = { + "/highlighting/blacklist"}; }; } // namespace chatterino