fix: Fixed account switch not being saved if no other settings were changed (#5558)

This commit is contained in:
pajlada
2024-08-24 15:02:08 +02:00
committed by GitHub
parent aa048b3793
commit 9f588b7406
17 changed files with 69 additions and 73 deletions
+10 -1
View File
@@ -25,6 +25,8 @@ using TimeoutButton = std::pair<QString, int>;
namespace chatterino {
class Args;
#ifdef Q_OS_WIN32
# define DEFAULT_FONT_FAMILY "Segoe UI"
# define DEFAULT_FONT_SIZE 10
@@ -80,12 +82,19 @@ class Settings
static Settings *instance_;
Settings *prevInstance_ = nullptr;
const bool disableSaving;
public:
Settings(const QString &settingsDirectory);
Settings(const Args &args, const QString &settingsDirectory);
~Settings();
static Settings &instance();
/// Request the settings to be saved to file
///
/// Depending on the launch options, a save might end up not happening
void requestSave() const;
void saveSnapshot();
void restoreSnapshot();