Fixed issue with Excluded users not saving from the highlights tab (#624)

This commit is contained in:
apa420 2018-07-16 17:09:29 +02:00 committed by fourtf
parent e51c5c692a
commit f33cc884b2
2 changed files with 9 additions and 1 deletions

View file

@ -24,6 +24,13 @@ void HighlightController::initialize(Application &app)
this->phrases.delayedItemsChanged.connect([this] { // this->phrases.delayedItemsChanged.connect([this] { //
this->highlightsSetting_.setValue(this->phrases.getVector()); 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) HighlightModel *HighlightController::createModel(QObject *parent)

View file

@ -39,7 +39,8 @@ private:
ChatterinoSetting<std::vector<HighlightPhrase>> highlightsSetting_ = { ChatterinoSetting<std::vector<HighlightPhrase>> highlightsSetting_ = {
"/highlighting/highlights"}; "/highlighting/highlights"};
ChatterinoSetting<std::vector<HighlightPhrase>> blacklistSetting_ = {"/highlighting/blacklist"}; ChatterinoSetting<std::vector<HighlightBlacklistUser>> blacklistSetting_ = {
"/highlighting/blacklist"};
}; };
} // namespace chatterino } // namespace chatterino