Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 93975e7

Browse files
DetailsUrl can be null
1 parent 1d09284 commit 93975e7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/GitHub.App/ViewModels/GitHubPane/PullRequestCheckViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static IEnumerable<IPullRequestCheckViewModel> Build(IViewViewModelFactor
4848
pullRequestCheckViewModel.Title = model.Context;
4949
pullRequestCheckViewModel.Description = model.Description;
5050
pullRequestCheckViewModel.Status = checkStatus;
51-
pullRequestCheckViewModel.DetailsUrl = new Uri(model.TargetUrl);
51+
pullRequestCheckViewModel.DetailsUrl = model.TargetUrl != null ? new Uri(model.TargetUrl) : null;
5252
pullRequestCheckViewModel.AvatarUrl = model.AvatarUrl ?? DefaultAvatar;
5353
pullRequestCheckViewModel.Avatar = model.AvatarUrl != null
5454
? new BitmapImage(new Uri(model.AvatarUrl))

src/GitHub.VisualStudio/Views/GitHubPane/PullRequestCheckView.xaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@
4545
<!--
4646
<Label Grid.Column="3" HorizontalAlignment="Right" Content="{Binding Description}" ToolTip="{Binding Description}" />
4747
-->
48-
<Label Grid.Column="3" HorizontalAlignment="Right">
49-
<Hyperlink ToolTip="{Binding DetailsUrl}" Command="{Binding OpenDetailsUrl}">Details</Hyperlink>
48+
<Label Grid.Column="3" HorizontalAlignment="Right"
49+
Visibility="{Binding DetailsUrl, Converter={ghfvs:NullToVisibilityConverter}}">
50+
<Hyperlink ToolTip="{Binding DetailsUrl}" Command="{Binding OpenDetailsUrl}">Details</Hyperlink>
5051
</Label>
5152
</Grid>
5253
</local:GenericPullRequestCheckView>

0 commit comments

Comments
 (0)