Work Around Weird Offline Behaviour

This commit is contained in:
Alan Moon 2025-07-19 13:31:54 -07:00
parent 6acb72975e
commit 8cb59e1b21

View File

@ -902,7 +902,7 @@ namespace qtc_net_client_2
} }
} }
private void _gatewayService_OnServerReconnected(object? sender, EventArgs e) private async void _gatewayService_OnServerReconnected(object? sender, EventArgs e)
{ {
LoggingService.LogString("SignalR Reconnected"); LoggingService.LogString("SignalR Reconnected");
@ -914,6 +914,15 @@ namespace qtc_net_client_2
lblConnectionLost.Visible = false; lblConnectionLost.Visible = false;
}); });
} }
// ensure status is set to whatever the current user was set to
try
{
await _gatewayService.UpdateStatus(_apiService.CurrentUser.Status);
} catch (InvalidOperationException)
{
LoggingService.LogString("Could Not Set Status Back To Online");
}
} }
private async void _gatewayService_OnServerConfigReceived(object? sender, EventArgs e) private async void _gatewayService_OnServerConfigReceived(object? sender, EventArgs e)