Skip to content

Commit c51f7a4

Browse files
committed
Update ThemeHelper.cs
1 parent afd7521 commit c51f7a4

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/Files.App/Helpers/ThemeHelper.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,11 @@ public static void Initialize()
6262
private static async void UiSettings_ColorValuesChanged(UISettings sender, object args)
6363
{
6464
// Make sure we have a reference to our window so we dispatch a UI change
65-
if (currentApplicationWindow is not null)
66-
{
67-
// Dispatch on UI thread so that we have a current appbar to access and change
68-
await currentApplicationWindow.DispatcherQueue.EnqueueAsync(() =>
69-
{
70-
ApplyTheme();
71-
});
72-
}
65+
if (currentApplicationWindow is null)
66+
return;
67+
68+
// Dispatch on UI thread so that we have a current appbar to access and change
69+
await currentApplicationWindow.DispatcherQueue.EnqueueAsync(ApplyTheme);
7370
}
7471

7572
private static void ApplyTheme()

0 commit comments

Comments
 (0)