Skip to content

Commit

Permalink
v1.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliviaophia committed Apr 14, 2022
1 parent cd9cf5a commit 8d9bd83
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
6 changes: 4 additions & 2 deletions Sources/SmartTaskbar.Win10/Worker/Engine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ public Engine(Container container)

private static async void Timer_Tick(object sender, EventArgs e)
{
if (UserSettings.AutoModeType != AutoModeType.Auto)
return;

_timer.Stop();

if (UserSettings.AutoModeType == AutoModeType.Auto)
await Task.Run(AutoModeWorker);
await Task.Run(AutoModeWorker);

_timer.Start();
}
Expand Down
12 changes: 9 additions & 3 deletions Sources/SmartTaskbar/Worker/Engine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,16 @@ public Engine(Container container)
_timer.Start();
}

private static void Timer_Tick(object sender, EventArgs e)
private static async void Timer_Tick(object sender, EventArgs e)
{
if (UserSettings.AutoModeType == AutoModeType.Auto)
Task.Run(AutoModeWorker);
if (UserSettings.AutoModeType != AutoModeType.Auto)
return;

_timer.Stop();

await Task.Run(AutoModeWorker);

_timer.Start();
}

private static void AutoModeWorker()
Expand Down

0 comments on commit 8d9bd83

Please sign in to comment.