-
Notifications
You must be signed in to change notification settings - Fork 3
feat: removed external dependencies (VPN, mutagen) connection management #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -189,7 +189,7 @@ private void SyncSessionStateChanged(object? sender, SyncSessionControllerStateM | |||
UpdateSyncSessionState(syncSessionState); | |||
} | |||
|
|||
private void MaybeSetUnavailableMessage(RpcModel rpcModel, CredentialModel credentialModel) | |||
private void MaybeSetUnavailableMessage(RpcModel rpcModel, CredentialModel credentialModel, SyncSessionControllerStateModel? syncSessionState = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should just update the couple of places we call it to always include the sync model, otherwise if we get an RPC update after a sync update we will potentially unset UnavailableMessage
using Coder.Desktop.App.Views.Pages; | ||
using CommunityToolkit.Mvvm.ComponentModel; | ||
using CommunityToolkit.Mvvm.Input; | ||
using Microsoft.UI.Xaml; | ||
using Microsoft.UI.Xaml.Controls; | ||
using System; | ||
using System.Diagnostics; | ||
using System.Threading.Tasks; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you use any of these new imports? It doesn't seem like you're using any new types (except maybe System.Exception
) in the code
<TextBlock TextWrapping="Wrap" Foreground="Red" Visibility="{x:Bind ViewModel.ReconnectFailed, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay}"> | ||
<Bold>Reconnect failed</Bold> | ||
</TextBlock> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you just do TextWeight
instead? See TrayWindowMainPage.xaml
and look at the Workspaces header (I think)
using Microsoft.UI.Xaml; | ||
using Microsoft.UI.Xaml.Controls; | ||
using System; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be unnecessary
|
||
syncSessionCts.Dispose(); | ||
}, CancellationToken.None); | ||
_ = Task.Delay(5000).ContinueWith((_) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should add a comment explaining why we do this. I think the explanation of "it seems to be a race" is good enough for now
Closes: #68