Skip to content

Commit 8daffc4

Browse files
committed
addresses #922
1 parent 3bd5825 commit 8daffc4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

AutoDarkModeSvc/SwitchComponents/Base/ScriptSwitch.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,23 @@ protected override async void HandleSwitch(SwitchEventArgs e)
5050
{
5151
if (e.Theme == Theme.Light)
5252
{
53+
currentComponentTheme = Theme.Light;
5354
Settings.Component.Scripts.ForEach(s =>
5455
{
5556
if (s.AllowedSources.Contains(SwitchSource.Any) || s.AllowedSources.Contains(e.Source))
5657
ScriptHandler.Launch(s.Name, s.Command, s.ArgsLight, s.TimeoutMillis, s.WorkingDirectory);
5758
});
58-
currentComponentTheme = Theme.Light;
59+
5960
}
6061
else
6162
{
63+
currentComponentTheme = Theme.Dark;
6264
Settings.Component.Scripts.ForEach(s =>
6365
{
6466
if (s.AllowedSources.Contains(SwitchSource.Any) || s.AllowedSources.Contains(e.Source))
6567
ScriptHandler.Launch(s.Name, s.Command, s.ArgsDark, s.TimeoutMillis, s.WorkingDirectory);
6668
});
67-
currentComponentTheme = Theme.Dark;
69+
6870
}
6971
});
7072
await switchTask;

0 commit comments

Comments
 (0)