From 37374eeb18849332fd2b5a5744924b466d1fce56 Mon Sep 17 00:00:00 2001 From: chylex Date: Sun, 31 Dec 2023 20:16:02 +0100 Subject: [PATCH] Migrate ConfigureAwait to Task.Run --- app/Desktop/Discord/DiscordAppSettings.cs | 2 +- app/Desktop/Main/Pages/TrackingPageModel.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Desktop/Discord/DiscordAppSettings.cs b/app/Desktop/Discord/DiscordAppSettings.cs index 327822c..79c936f 100644 --- a/app/Desktop/Discord/DiscordAppSettings.cs +++ b/app/Desktop/Discord/DiscordAppSettings.cs @@ -39,7 +39,7 @@ static DiscordAppSettings() { public static async Task AreDevToolsEnabled() { try { - var settingsJson = await ReadSettingsJson().ConfigureAwait(false); + var settingsJson = await ReadSettingsJson(); return AreDevToolsEnabled(settingsJson); } catch (Exception e) { Log.Error("Cannot read settings file."); diff --git a/app/Desktop/Main/Pages/TrackingPageModel.cs b/app/Desktop/Main/Pages/TrackingPageModel.cs index 75def60..919334d 100644 --- a/app/Desktop/Main/Pages/TrackingPageModel.cs +++ b/app/Desktop/Main/Pages/TrackingPageModel.cs @@ -78,7 +78,7 @@ private async Task CopyTrackingScript() { } private async Task InitializeDevToolsToggle() { - bool? devToolsEnabled = await DiscordAppSettings.AreDevToolsEnabled(); + bool? devToolsEnabled = await Task.Run(DiscordAppSettings.AreDevToolsEnabled); if (devToolsEnabled.HasValue) { AreDevToolsEnabled = devToolsEnabled.Value;