Skip to content

Commit

Permalink
Migrate ConfigureAwait to Task.Run
Browse files Browse the repository at this point in the history
  • Loading branch information
chylex committed Dec 31, 2023
1 parent 23ddb45 commit 37374ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Desktop/Discord/DiscordAppSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static DiscordAppSettings() {

public static async Task<bool?> AreDevToolsEnabled() {
try {
var settingsJson = await ReadSettingsJson().ConfigureAwait(false);
var settingsJson = await ReadSettingsJson();
return AreDevToolsEnabled(settingsJson);
} catch (Exception e) {
Log.Error("Cannot read settings file.");
Expand Down
2 changes: 1 addition & 1 deletion app/Desktop/Main/Pages/TrackingPageModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private async Task<bool> CopyTrackingScript() {
}

private async Task InitializeDevToolsToggle() {
bool? devToolsEnabled = await DiscordAppSettings.AreDevToolsEnabled();
bool? devToolsEnabled = await Task.Run(DiscordAppSettings.AreDevToolsEnabled);

if (devToolsEnabled.HasValue) {
AreDevToolsEnabled = devToolsEnabled.Value;
Expand Down

0 comments on commit 37374ee

Please sign in to comment.