Skip to content

Commit

Permalink
chore: minor fixes in TodoApp
Browse files Browse the repository at this point in the history
  • Loading branch information
alexyakunin committed Dec 3, 2023
1 parent 0bd0b97 commit 0328090
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions samples/TodoApp/UI/Shared/BarConnectionStatus.razor
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@

[Parameter] public string CssClass { get; set; } = "";

protected override IState<RpcPeerState> CreateState()
=> Monitor.State;
protected override void OnInitialized()
{
State = Monitor.State;
base.OnInitialized();
}

public override ValueTask DisposeAsync()
=> default; // State shouldn't be disposed
private void Reconnect()
=> Services.RpcHub().InternalServices.ClientPeerReconnectDelayer.CancelDelays();
Expand Down
10 changes: 8 additions & 2 deletions samples/TodoApp/UI/Shared/TextConnectionStatus.razor
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,14 @@
[Parameter]
public string CssClass { get; set; } = "";

protected override IState<RpcPeerState> CreateState()
=> Monitor.State;
protected override void OnInitialized()
{
State = Monitor.State;
base.OnInitialized();
}

public override ValueTask DisposeAsync()
=> default; // State shouldn't be disposed
private void Reconnect()
=> Services.RpcHub().InternalServices.ClientPeerReconnectDelayer.CancelDelays();
Expand Down

0 comments on commit 0328090

Please sign in to comment.