From 080346f63931750f99e153efc0d29ee3d73c73bf Mon Sep 17 00:00:00 2001 From: zombieFox Date: Fri, 24 Sep 2021 10:21:38 +0100 Subject: [PATCH] improve group toolbar opacity update on theme change --- src/component/customThemeTile/index.js | 6 ------ src/component/group/index.js | 2 ++ src/component/menuContent/themeSetting/index.js | 10 +++------- src/component/presetThemeTile/index.js | 6 ------ 4 files changed, 5 insertions(+), 19 deletions(-) diff --git a/src/component/customThemeTile/index.js b/src/component/customThemeTile/index.js index b46c3480..3c61b793 100644 --- a/src/component/customThemeTile/index.js +++ b/src/component/customThemeTile/index.js @@ -316,12 +316,6 @@ export const CustomThemeTile = function({ header.element.search.update.style(); - if (group.area.current.length > 0) { - - group.area.current[0].update.style(); - - }; - data.save(); } diff --git a/src/component/group/index.js b/src/component/group/index.js index 814c14cc..4cce662d 100644 --- a/src/component/group/index.js +++ b/src/component/group/index.js @@ -188,6 +188,7 @@ group.edit = { applyCSSState('group.edit'); if (group.area.current.length > 0) { + group.area.current.forEach((item, i) => { if (state.get.current().group.edit) { @@ -197,6 +198,7 @@ group.edit = { }; }); + }; } diff --git a/src/component/menuContent/themeSetting/index.js b/src/component/menuContent/themeSetting/index.js index 66ebcab7..a13118d6 100644 --- a/src/component/menuContent/themeSetting/index.js +++ b/src/component/menuContent/themeSetting/index.js @@ -1137,12 +1137,6 @@ themeSetting.opacity = (parent) => { header.element.search.update.style(); - if (group.area.current.length > 0) { - - group.area.current[0].update.style(); - - }; - data.save(); } @@ -1230,7 +1224,9 @@ themeSetting.opacity = (parent) => { if (group.area.current.length > 0) { - group.area.current[0].update.style(); + group.area.current.forEach((item, i) => { + item.update.style(); + }); }; diff --git a/src/component/presetThemeTile/index.js b/src/component/presetThemeTile/index.js index df4b2b0f..b46bbc9c 100644 --- a/src/component/presetThemeTile/index.js +++ b/src/component/presetThemeTile/index.js @@ -311,12 +311,6 @@ export const PresetThemeTile = function({ header.element.search.update.style(); - if (group.area.current.length > 0) { - - group.area.current[0].update.style(); - - }; - data.save(); }