Remove BaseSettings & merge ConcurrentSettings (#4775)
This commit is contained in:
@@ -8,14 +8,14 @@ namespace chatterino {
|
||||
FilterSet::FilterSet()
|
||||
{
|
||||
this->listener_ =
|
||||
getCSettings().filterRecords.delayedItemsChanged.connect([this] {
|
||||
getSettings()->filterRecords.delayedItemsChanged.connect([this] {
|
||||
this->reloadFilters();
|
||||
});
|
||||
}
|
||||
|
||||
FilterSet::FilterSet(const QList<QUuid> &filterIds)
|
||||
{
|
||||
auto filters = getCSettings().filterRecords.readOnly();
|
||||
auto filters = getSettings()->filterRecords.readOnly();
|
||||
for (const auto &f : *filters)
|
||||
{
|
||||
if (filterIds.contains(f->getId()))
|
||||
@@ -23,7 +23,7 @@ FilterSet::FilterSet(const QList<QUuid> &filterIds)
|
||||
}
|
||||
|
||||
this->listener_ =
|
||||
getCSettings().filterRecords.delayedItemsChanged.connect([this] {
|
||||
getSettings()->filterRecords.delayedItemsChanged.connect([this] {
|
||||
this->reloadFilters();
|
||||
});
|
||||
}
|
||||
@@ -55,7 +55,7 @@ const QList<QUuid> FilterSet::filterIds() const
|
||||
|
||||
void FilterSet::reloadFilters()
|
||||
{
|
||||
auto filters = getCSettings().filterRecords.readOnly();
|
||||
auto filters = getSettings()->filterRecords.readOnly();
|
||||
for (const auto &key : this->filters_.keys())
|
||||
{
|
||||
bool found = false;
|
||||
|
||||
@@ -441,7 +441,7 @@ void HighlightController::initialize(Settings &settings, Paths & /*paths*/)
|
||||
});
|
||||
|
||||
this->signalHolder_.managedConnect(
|
||||
getCSettings().highlightedBadges.delayedItemsChanged,
|
||||
getSettings()->highlightedBadges.delayedItemsChanged,
|
||||
[this, &settings] {
|
||||
qCDebug(chatterinoHighlights)
|
||||
<< "Rebuild checks because highlight badges changed";
|
||||
@@ -449,14 +449,14 @@ void HighlightController::initialize(Settings &settings, Paths & /*paths*/)
|
||||
});
|
||||
|
||||
this->signalHolder_.managedConnect(
|
||||
getCSettings().highlightedUsers.delayedItemsChanged, [this, &settings] {
|
||||
getSettings()->highlightedUsers.delayedItemsChanged, [this, &settings] {
|
||||
qCDebug(chatterinoHighlights)
|
||||
<< "Rebuild checks because highlight users changed";
|
||||
this->rebuildChecks(settings);
|
||||
});
|
||||
|
||||
this->signalHolder_.managedConnect(
|
||||
getCSettings().highlightedMessages.delayedItemsChanged,
|
||||
getSettings()->highlightedMessages.delayedItemsChanged,
|
||||
[this, &settings] {
|
||||
qCDebug(chatterinoHighlights)
|
||||
<< "Rebuild checks because highlight messages changed";
|
||||
|
||||
@@ -14,7 +14,7 @@ bool isIgnoredMessage(IgnoredMessageParameters &¶ms)
|
||||
if (!params.message.isEmpty())
|
||||
{
|
||||
// TODO(pajlada): Do we need to check if the phrase is valid first?
|
||||
auto phrases = getCSettings().ignoredMessages.readOnly();
|
||||
auto phrases = getSettings()->ignoredMessages.readOnly();
|
||||
for (const auto &phrase : *phrases)
|
||||
{
|
||||
if (phrase.isBlock() && phrase.isMatch(params.message))
|
||||
|
||||
Reference in New Issue
Block a user