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: 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: Fixed `<build-tool> clean` not working correctly with generated sources. (#6154)
- Dev: Removed authenticated PubSub implementation. (#6158) - Dev: Removed authenticated PubSub implementation. (#6158)
- Dev: Removed unused `ignoredPhraseReplace` setting. (#6304)
- Dev: Save settings in `aboutToQuit`. (#6159) - Dev: Save settings in `aboutToQuit`. (#6159)
- Dev: Bumped deprecation cutoff to Qt 6.4.3. (#6169) - Dev: Bumped deprecation cutoff to Qt 6.4.3. (#6169)
- Dev: Use `QMetaObject::invokeMethod` to run code on a specific thread. (#6203, #6278) - 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 "Application.hpp"
#include "controllers/accounts/AccountController.hpp" #include "controllers/accounts/AccountController.hpp"
#include "providers/twitch/TwitchAccount.hpp" #include "providers/twitch/TwitchAccount.hpp" // IWYU pragma: keep
#include "singletons/Settings.hpp"
namespace chatterino { namespace chatterino {
@@ -115,8 +114,9 @@ bool IgnorePhrase::containsEmote() const
IgnorePhrase IgnorePhrase::createEmpty() IgnorePhrase IgnorePhrase::createEmpty()
{ {
return IgnorePhrase(QString(), false, false, return {
getSettings()->ignoredPhraseReplace.getValue(), true); {}, false, false, DEFAULT_IGNORE_PHRASE_REPLACE.toString(), true,
};
} }
} // namespace chatterino } // namespace chatterino
+3
View File
@@ -7,12 +7,15 @@
#include <pajlada/serialize.hpp> #include <pajlada/serialize.hpp>
#include <QRegularExpression> #include <QRegularExpression>
#include <QString> #include <QString>
#include <QStringView>
#include <memory> #include <memory>
#include <unordered_map> #include <unordered_map>
namespace chatterino { namespace chatterino {
constexpr inline QStringView DEFAULT_IGNORE_PHRASE_REPLACE = u"***";
struct Emote; struct Emote;
using EmotePtr = std::shared_ptr<const Emote>; using EmotePtr = std::shared_ptr<const Emote>;
-4
View File
@@ -425,10 +425,6 @@ public:
true, true,
}; };
/// Ignored Phrases
QStringSetting ignoredPhraseReplace = {"/ignore/ignoredPhraseReplace",
"***"};
/// Blocked Users /// Blocked Users
BoolSetting enableTwitchBlockedUsers = {"/ignore/enableTwitchBlockedUsers", BoolSetting enableTwitchBlockedUsers = {"/ignore/enableTwitchBlockedUsers",
true}; 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 // We can safely ignore this signal connection since we own the view
std::ignore = view->addButtonPressed.connect([] { std::ignore = view->addButtonPressed.connect([] {
getSettings()->ignoredMessages.append( getSettings()->ignoredMessages.append(IgnorePhrase{
IgnorePhrase{"my pattern", false, false, "my pattern",
getSettings()->ignoredPhraseReplace.getValue(), true}); false,
false,
DEFAULT_IGNORE_PHRASE_REPLACE.toString(),
true,
});
}); });
} }