refactor: remove unused ignoredPhraseReplace setting (#6304)

This commit is contained in:
pajlada
2025-06-28 15:27:46 +02:00
committed by GitHub
parent 42fb5ad077
commit 9e59fb1a5f
5 changed files with 15 additions and 11 deletions
+1
View File
@@ -44,6 +44,7 @@
- Dev: Pass `--force-openssl` when installing from CMake in Qt 6.8+. (#6129)
- Dev: Fixed `<build-tool> clean` not working correctly with generated sources. (#6154)
- Dev: Removed authenticated PubSub implementation. (#6158)
- Dev: Removed unused `ignoredPhraseReplace` setting. (#6304)
- Dev: Save settings in `aboutToQuit`. (#6159)
- Dev: Bumped deprecation cutoff to Qt 6.4.3. (#6169)
- Dev: Use `QMetaObject::invokeMethod` to run code on a specific thread. (#6203, #6278)
+4 -4
View File
@@ -2,8 +2,7 @@
#include "Application.hpp"
#include "controllers/accounts/AccountController.hpp"
#include "providers/twitch/TwitchAccount.hpp"
#include "singletons/Settings.hpp"
#include "providers/twitch/TwitchAccount.hpp" // IWYU pragma: keep
namespace chatterino {
@@ -115,8 +114,9 @@ bool IgnorePhrase::containsEmote() const
IgnorePhrase IgnorePhrase::createEmpty()
{
return IgnorePhrase(QString(), false, false,
getSettings()->ignoredPhraseReplace.getValue(), true);
return {
{}, false, false, DEFAULT_IGNORE_PHRASE_REPLACE.toString(), true,
};
}
} // namespace chatterino
+3
View File
@@ -7,12 +7,15 @@
#include <pajlada/serialize.hpp>
#include <QRegularExpression>
#include <QString>
#include <QStringView>
#include <memory>
#include <unordered_map>
namespace chatterino {
constexpr inline QStringView DEFAULT_IGNORE_PHRASE_REPLACE = u"***";
struct Emote;
using EmotePtr = std::shared_ptr<const Emote>;
-4
View File
@@ -425,10 +425,6 @@ public:
true,
};
/// Ignored Phrases
QStringSetting ignoredPhraseReplace = {"/ignore/ignoredPhraseReplace",
"***"};
/// Blocked Users
BoolSetting enableTwitchBlockedUsers = {"/ignore/enableTwitchBlockedUsers",
true};
+7 -3
View File
@@ -64,9 +64,13 @@ void addPhrasesTab(LayoutCreator<QVBoxLayout> layout)
// We can safely ignore this signal connection since we own the view
std::ignore = view->addButtonPressed.connect([] {
getSettings()->ignoredMessages.append(
IgnorePhrase{"my pattern", false, false,
getSettings()->ignoredPhraseReplace.getValue(), true});
getSettings()->ignoredMessages.append(IgnorePhrase{
"my pattern",
false,
false,
DEFAULT_IGNORE_PHRASE_REPLACE.toString(),
true,
});
});
}