Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideWiest committed Jun 19, 2024
1 parent 680e67f commit 3cdbe02
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Reader/Modules/Logging/Log.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private static async Task PostToCentralLog(string messageTemplate, params object
using (var httpClient = new HttpClient())
{
httpClient.Timeout = TimeSpan.FromSeconds(4);
Task.Run(async () => await httpClient.PostAsync(Constants.CentralLoggerEndpoint, content));
_ = Task.Run(async () => await httpClient.PostAsync(Constants.CentralLoggerEndpoint, content));
}
}
catch (Exception e)
Expand Down
1 change: 0 additions & 1 deletion Reader/Modules/Reading/ReaderConfigManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ public string FrontMiddleCharHighlightingColor

public void SaveConfig()
{
Console.WriteLine("Saving config");
_ = Task.Run(() => localStorage.SetItemAsStringAsync("readerConfig", JsonConvert.SerializeObject(Config)));
}

Expand Down
6 changes: 3 additions & 3 deletions Reader/Modules/Reading/ReaderContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,15 @@ public async Task HandleTitleChanged(string newTitle)

public async Task OverwriteState()
{
PrepareSelectedStateChanging();
await PrepareSelectedStateChanging();
await HandleSelectedReaderStateChanged();
}


public void PrepareSelectedStateChanging()
public async Task PrepareSelectedStateChanging()
{
if (Manager != null)
Manager.StopReadingTask();
await Manager.StopReadingTask();
}

public async Task HandleSelectedReaderStateChanged()
Expand Down
6 changes: 3 additions & 3 deletions Reader/Modules/Reading/ReaderManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ public void SetupTextPieces()
ClampPosition();
}

public void HandleStartStop()
public async Task HandleStartStop()
{
if (!ReadingStatus)
{
StartReadingTask();
await StartReadingTask();
}
else
{
StopReadingTask();
await StopReadingTask();
}
}

Expand Down
2 changes: 1 addition & 1 deletion Reader/Shared/Reading/ReaderView.razor
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
if (firstRender)
{
_hotKeysContext = this.HotKeys.CreateContext();
_hotKeysContext.Add(ModCode.None, Code.Space, (Action)(async () => { ReaderContext.Manager.HandleStartStop(); await InvokeAsync(() => StateHasChanged()); }));
_hotKeysContext.Add(ModCode.None, Code.Space, (Action)(async () => { await ReaderContext.Manager.HandleStartStop(); await InvokeAsync(() => StateHasChanged()); }));
_hotKeysContext.Add(ModCode.None, Code.ArrowLeft, (Action)(async () => { ReaderContext.Manager.HandleNavBefore(); await InvokeAsync(() => StateHasChanged()); }));
_hotKeysContext.Add(ModCode.None, Code.ArrowRight, ReaderContext.Manager.HandleNavNext);
_hotKeysContext.Add(ModCode.Ctrl, Code.F, (Action)(async () => await ToggleFocusMode()));
Expand Down

0 comments on commit 3cdbe02

Please sign in to comment.