fix: compare settings before updating them (#5240)

This commit is contained in:
pajlada
2024-03-09 16:03:26 +01:00
committed by GitHub
parent 2e77b47ea1
commit 2361d30e4b
5 changed files with 17 additions and 4 deletions
+5 -2
View File
@@ -13,13 +13,16 @@ class ChatterinoSetting : public pajlada::Settings::Setting<Type>
{
public:
ChatterinoSetting(const std::string &path)
: pajlada::Settings::Setting<Type>(path)
: pajlada::Settings::Setting<Type>(
path, pajlada::Settings::SettingOption::CompareBeforeSet)
{
_registerSetting(this->getData());
}
ChatterinoSetting(const std::string &path, const Type &defaultValue)
: pajlada::Settings::Setting<Type>(path, defaultValue)
: pajlada::Settings::Setting<Type>(
path, defaultValue,
pajlada::Settings::SettingOption::CompareBeforeSet)
{
_registerSetting(this->getData());
}