Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c6d45ea

Browse files
committed
fix various warnings
1 parent 1d3d9df commit c6d45ea

File tree

6 files changed

+7
-8
lines changed

6 files changed

+7
-8
lines changed

App/Controls/ExpandChevron.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
Height="16"
1818
Margin="0,0,8,0"
1919
RenderTransformOrigin="0.5, 0.5"
20-
Foreground="{x:Bind Foreground, Mode=Oneway}"
20+
Foreground="{x:Bind Foreground, Mode=OneWay}"
2121
HorizontalAlignment="Center"
2222
VerticalAlignment="Center"
2323
AnimatedIcon.State="NormalOff">

App/Controls/ExpandChevron.xaml.cs

-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
using DependencyPropertyGenerator;
22
using Microsoft.UI.Xaml.Controls;
3-
using Microsoft.UI.Xaml.Media;
43

54
namespace Coder.Desktop.App.Controls;
65

76
[DependencyProperty<bool>("IsOpen", DefaultValue = false)]
8-
[DependencyProperty<SolidColorBrush>("Foreground")]
97
public sealed partial class ExpandChevron : UserControl
108
{
119
public ExpandChevron()

App/Services/CredentialManager.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public CredentialModel GetCachedCredentials()
105105
public CoderApiClientCredential? GetCoderApiClientCredential()
106106
{
107107
var latestCreds = _latestCredentials;
108-
if (latestCreds is not { State: CredentialState.Valid })
108+
if (latestCreds is not { State: CredentialState.Valid } || latestCreds.CoderUrl is null)
109109
return null;
110110

111111
return new CoderApiClientCredential

App/ViewModels/FileSyncListViewModel.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,8 @@ public void OpenRemotePathSelectDialog()
339339
pickerViewModel.PathSelected += OnRemotePathSelected;
340340

341341
_remotePickerWindow = new DirectoryPickerWindow(pickerViewModel);
342-
_remotePickerWindow.SetParent(_window);
342+
if (_window is not null)
343+
_remotePickerWindow.SetParent(_window);
343344
_remotePickerWindow.Closed += (_, _) =>
344345
{
345346
_remotePickerWindow = null;

App/Views/Pages/SignInTokenPage.xaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,14 @@
8686
<Button
8787
Content="Back" HorizontalAlignment="Right"
8888
Command="{x:Bind ViewModel.TokenPage_BackCommand, Mode=OneWay}"
89-
CommandParameter="{x:Bind SignInWindow, Mode=OneWay}" />
89+
CommandParameter="{x:Bind SignInWindow}" />
9090

9191
<Button
9292
Content="Sign In"
9393
HorizontalAlignment="Left"
9494
Style="{StaticResource AccentButtonStyle}"
9595
Command="{x:Bind ViewModel.TokenPage_SignInCommand, Mode=OneWay}"
96-
CommandParameter="{x:Bind SignInWindow, Mode=OneWay}" />
96+
CommandParameter="{x:Bind SignInWindow}" />
9797
</StackPanel>
9898
</StackPanel>
9999
</Page>

App/Views/Pages/SignInUrlPage.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
Content="Next"
6262
HorizontalAlignment="Center"
6363
Command="{x:Bind ViewModel.UrlPage_NextCommand, Mode=OneWay}"
64-
CommandParameter="{x:Bind SignInWindow, Mode=OneWay}"
64+
CommandParameter="{x:Bind SignInWindow}"
6565
Style="{StaticResource AccentButtonStyle}" />
6666
</StackPanel>
6767
</Page>

0 commit comments

Comments
 (0)