From 0698f096d1bcc40911f721d026a7b36d804013d6 Mon Sep 17 00:00:00 2001 From: RadRussianRus Date: Mon, 14 Oct 2019 07:27:42 +0300 Subject: [PATCH] Do not rewrite settings if there are no changes --- Telegram/SourceFiles/core/kotato_settings.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/core/kotato_settings.cpp b/Telegram/SourceFiles/core/kotato_settings.cpp index e3b7ebbd2..8edac6f39 100644 --- a/Telegram/SourceFiles/core/kotato_settings.cpp +++ b/Telegram/SourceFiles/core/kotato_settings.cpp @@ -85,10 +85,10 @@ void Manager::fill() { } void Manager::write(bool force) { - if (force) { + if (force && _jsonWriteTimer.isActive()) { _jsonWriteTimer.stop(); writeTimeout(); - } else if (!_jsonWriteTimer.isActive()) { + } else if (!force && !_jsonWriteTimer.isActive()) { _jsonWriteTimer.start(kWriteJsonTimeout); } }