mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Merge pull request #922 from apa420/apa-saving-highlighted-users
Fixed the highlighted user saving the name after chatterino closes
This commit is contained in:
commit
5311356bed
|
@ -35,6 +35,15 @@ void HighlightController::initialize(Settings &settings, Paths &paths)
|
|||
this->blacklistedUsers.delayedItemsChanged.connect([this] {
|
||||
this->blacklistSetting_.setValue(this->blacklistedUsers.getVector());
|
||||
});
|
||||
|
||||
for (const HighlightPhrase &user : this->userSetting_.getValue())
|
||||
{
|
||||
this->highlightedUsers.appendItem(user);
|
||||
}
|
||||
|
||||
this->highlightedUsers.delayedItemsChanged.connect([this] { //
|
||||
this->userSetting_.setValue(this->highlightedUsers.getVector());
|
||||
});
|
||||
}
|
||||
|
||||
HighlightModel *HighlightController::createModel(QObject *parent)
|
||||
|
|
|
@ -45,6 +45,8 @@ private:
|
|||
"/highlighting/highlights"};
|
||||
ChatterinoSetting<std::vector<HighlightBlacklistUser>> blacklistSetting_ = {
|
||||
"/highlighting/blacklist"};
|
||||
ChatterinoSetting<std::vector<HighlightPhrase>> userSetting_ = {
|
||||
"/highlighting/users"};
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
|
Loading…
Reference in a new issue