2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Reset some settings on full logout.

This commit is contained in:
John Preston
2020-06-19 19:51:51 +04:00
parent 2635ca33f8
commit 0824d2da20
4 changed files with 62 additions and 5 deletions

View File

@@ -137,11 +137,6 @@ void applyReadContext(ReadSettingsContext &&context) {
_useGlobalBackgroundKeys = context.backgroundKeysRead;
_langPackKey = context.langPackKey;
_languagesKey = context.languagesKey;
if (context.tileRead && _useGlobalBackgroundKeys) {
Window::Theme::Background()->setTileDayValue(context.tileDay);
Window::Theme::Background()->setTileNightValue(context.tileNight);
}
}
bool _readOldSettings(bool remove, ReadSettingsContext &context) {
@@ -411,6 +406,12 @@ void start() {
applyReadContext(std::move(context));
InitialLoadTheme();
if (context.tileRead && _useGlobalBackgroundKeys) {
Window::Theme::Background()->setTileDayValue(context.tileDay);
Window::Theme::Background()->setTileNightValue(context.tileNight);
}
readLangPack();
}
@@ -795,6 +796,8 @@ void reset() {
Window::Theme::Background()->reset();
_oldSettingsVersion = 0;
Core::App().settings().resetOnLastLogout();
writeSettings();
}
int32 oldSettingsVersion() {