fix: compare settings before updating them (#5240)
This commit is contained in:
@@ -75,6 +75,7 @@
|
||||
- Bugfix: Fixed triple click on message also selecting moderation buttons. (#4961)
|
||||
- Bugfix: Fixed a freeze from a bad regex in _Ignores_. (#4965, #5126)
|
||||
- Bugfix: Fixed badge highlight changes not immediately being reflected. (#5110)
|
||||
- Bugfix: Fixed emotes being reloaded when pressing "Cancel" in the settings dialog, causing a slowdown. (#5240)
|
||||
- Bugfix: Fixed some emotes not appearing when using _Ignores_. (#4965, #5126)
|
||||
- Bugfix: Fixed lookahead/-behind not working in _Ignores_. (#4965, #5126)
|
||||
- Bugfix: Fixed Image Uploader accidentally deleting images with some hosts when link resolver was enabled. (#4971)
|
||||
|
||||
+1
-1
Submodule lib/settings updated: 41ef7899b1...ceac9c7e97
@@ -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());
|
||||
}
|
||||
|
||||
@@ -7,6 +7,11 @@ ChannelLog::ChannelLog(QString channelName)
|
||||
{
|
||||
}
|
||||
|
||||
bool ChannelLog::operator==(const ChannelLog &other) const
|
||||
{
|
||||
return this->channelName_ == other.channelName_;
|
||||
}
|
||||
|
||||
QString ChannelLog::channelName() const
|
||||
{
|
||||
return this->channelName_.toLower();
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "controllers/moderationactions/ModerationAction.hpp"
|
||||
#include "controllers/nicknames/Nickname.hpp"
|
||||
#include "debug/Benchmark.hpp"
|
||||
#include "pajlada/settings/signalargs.hpp"
|
||||
#include "util/Clamp.hpp"
|
||||
#include "util/PersistSignalVector.hpp"
|
||||
#include "util/WindowsHelper.hpp"
|
||||
@@ -257,7 +258,10 @@ void Settings::restoreSnapshot()
|
||||
continue;
|
||||
}
|
||||
|
||||
setting->marshalJSON(snapshot[path]);
|
||||
pajlada::Settings::SignalArgs args;
|
||||
args.compareBeforeSet = true;
|
||||
|
||||
setting->marshalJSON(snapshot[path], std::move(args));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user