mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 22:16:14 +00:00
Improved night mode switching.
This commit is contained in:
@@ -778,13 +778,9 @@ void ChatBackground::toggleNightMode() {
|
|||||||
// Theme editor could have already reverted the testing of this toggle.
|
// Theme editor could have already reverted the testing of this toggle.
|
||||||
if (AreTestingTheme()) {
|
if (AreTestingTheme()) {
|
||||||
_nightMode = newNightMode;
|
_nightMode = newNightMode;
|
||||||
if (oldNightMode) {
|
|
||||||
_tileDayValue = _tileNightValue;
|
// Restore the value, it was set inside theme testing.
|
||||||
_tileNightValue = oldTileValue;
|
(oldNightMode ? _tileNightValue : _tileDayValue) = oldTileValue;
|
||||||
} else {
|
|
||||||
_tileNightValue = _tileDayValue;
|
|
||||||
_tileDayValue = oldTileValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// We don't call full KeepApplied() here, because
|
// We don't call full KeepApplied() here, because
|
||||||
// we don't need to write theme or overwrite current background.
|
// we don't need to write theme or overwrite current background.
|
||||||
|
Reference in New Issue
Block a user