mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
fix: compare settings before updating them (#5240)
This commit is contained in:
parent
2e77b47ea1
commit
2361d30e4b
5 changed files with 17 additions and 4 deletions
|
@ -75,6 +75,7 @@
|
||||||
- Bugfix: Fixed triple click on message also selecting moderation buttons. (#4961)
|
- 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 a freeze from a bad regex in _Ignores_. (#4965, #5126)
|
||||||
- Bugfix: Fixed badge highlight changes not immediately being reflected. (#5110)
|
- 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 some emotes not appearing when using _Ignores_. (#4965, #5126)
|
||||||
- Bugfix: Fixed lookahead/-behind not working in _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)
|
- Bugfix: Fixed Image Uploader accidentally deleting images with some hosts when link resolver was enabled. (#4971)
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 41ef7899b1cce35982f2dac600b2034375574f49
|
Subproject commit ceac9c7e97d2d2b97f40ecd0b421e358d7525cbc
|
|
@ -13,13 +13,16 @@ class ChatterinoSetting : public pajlada::Settings::Setting<Type>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ChatterinoSetting(const std::string &path)
|
ChatterinoSetting(const std::string &path)
|
||||||
: pajlada::Settings::Setting<Type>(path)
|
: pajlada::Settings::Setting<Type>(
|
||||||
|
path, pajlada::Settings::SettingOption::CompareBeforeSet)
|
||||||
{
|
{
|
||||||
_registerSetting(this->getData());
|
_registerSetting(this->getData());
|
||||||
}
|
}
|
||||||
|
|
||||||
ChatterinoSetting(const std::string &path, const Type &defaultValue)
|
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());
|
_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
|
QString ChannelLog::channelName() const
|
||||||
{
|
{
|
||||||
return this->channelName_.toLower();
|
return this->channelName_.toLower();
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include "controllers/moderationactions/ModerationAction.hpp"
|
#include "controllers/moderationactions/ModerationAction.hpp"
|
||||||
#include "controllers/nicknames/Nickname.hpp"
|
#include "controllers/nicknames/Nickname.hpp"
|
||||||
#include "debug/Benchmark.hpp"
|
#include "debug/Benchmark.hpp"
|
||||||
|
#include "pajlada/settings/signalargs.hpp"
|
||||||
#include "util/Clamp.hpp"
|
#include "util/Clamp.hpp"
|
||||||
#include "util/PersistSignalVector.hpp"
|
#include "util/PersistSignalVector.hpp"
|
||||||
#include "util/WindowsHelper.hpp"
|
#include "util/WindowsHelper.hpp"
|
||||||
|
@ -257,7 +258,10 @@ void Settings::restoreSnapshot()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
setting->marshalJSON(snapshot[path]);
|
pajlada::Settings::SignalArgs args;
|
||||||
|
args.compareBeforeSet = true;
|
||||||
|
|
||||||
|
setting->marshalJSON(snapshot[path], std::move(args));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue