From 994a58c8b198337db77631b18709c490a2e20cb8 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Fri, 2 Sep 2022 21:20:45 +0300 Subject: [PATCH] [desktop] fix bug 58765 --- .../forms/app/controller/ApplicationController.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/forms/app/controller/ApplicationController.js b/apps/documenteditor/forms/app/controller/ApplicationController.js index 7a2f2f2b28..94d40e7ed9 100644 --- a/apps/documenteditor/forms/app/controller/ApplicationController.js +++ b/apps/documenteditor/forms/app/controller/ApplicationController.js @@ -1943,9 +1943,13 @@ define([ Common.NotificationCenter.on({ 'uitheme:changed' : function (name) { - var theme = Common.UI.Themes.get(name); - if ( theme ) - native.execCommand("uitheme:changed", JSON.stringify({name:name, type:theme.type})); + if (Common.localStorage.getBool('ui-theme-use-system', false)) { + native.execCommand("uitheme:changed", JSON.stringify({name:'theme-system'})); + } else { + const theme = Common.UI.Themes.get(name); + if ( theme ) + native.execCommand("uitheme:changed", JSON.stringify({name:name, type:theme.type})); + } }, });