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

Commit eaef6c6

Browse files
Revert "Hiding the checks section if there are no checks to display"
This reverts commit f3635e9.
1 parent f8c3d3d commit eaef6c6

File tree

4 files changed

+1
-18
lines changed

4 files changed

+1
-18
lines changed

src/GitHub.App/SampleData/PullRequestDetailViewModelDesigner.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ public PullRequestDetailViewModelDesigner()
9898
Files = new PullRequestFilesViewModelDesigner();
9999

100100
Checks = Array.Empty<PullRequestCheckViewModelDesigner>();
101-
HasChecks = false;
102101
}
103102

104103
public PullRequestDetailModel Model { get; }
@@ -130,7 +129,6 @@ public PullRequestDetailViewModelDesigner()
130129
public ReactiveCommand<IPullRequestCheckViewModel, Unit> ShowAnnotations { get; }
131130

132131
public IReadOnlyList<IPullRequestCheckViewModel> Checks { get; }
133-
public bool HasChecks { get; }
134132

135133
public Task InitializeAsync(LocalRepositoryModel localRepository, IConnection connection, string owner, string repo, int number) => Task.CompletedTask;
136134

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public sealed class PullRequestDetailViewModel : PanePageViewModelBase, IPullReq
5858
Uri webUrl;
5959
IDisposable sessionSubscription;
6060
IReadOnlyList<IPullRequestCheckViewModel> checks;
61-
bool hasChecks;
6261

6362
/// <summary>
6463
/// Initializes a new instance of the <see cref="PullRequestDetailViewModel"/> class.
@@ -283,13 +282,6 @@ public IReadOnlyList<IPullRequestCheckViewModel> Checks
283282
private set { this.RaiseAndSetIfChanged(ref checks, value); }
284283
}
285284

286-
/// <inheritdoc/>
287-
public bool HasChecks
288-
{
289-
get { return hasChecks; }
290-
private set { this.RaiseAndSetIfChanged(ref hasChecks, value); }
291-
}
292-
293285
/// <inheritdoc/>
294286
public async Task InitializeAsync(
295287
LocalRepositoryModel localRepository,
@@ -359,7 +351,6 @@ public async Task Load(PullRequestDetailModel pullRequest)
359351
Reviews = PullRequestReviewSummaryViewModel.BuildByUser(Session.User, pullRequest).ToList();
360352

361353
Checks = PullRequestCheckViewModel.Build(viewViewModelFactory, pullRequest)?.ToList();
362-
HasChecks = Checks?.Any() ?? false;
363354

364355
await Files.InitializeAsync(Session);
365356

src/GitHub.Exports.Reactive/ViewModels/GitHubPane/IPullRequestDetailViewModel.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,6 @@ public interface IPullRequestDetailViewModel : IPanePageViewModel, IOpenInBrowse
191191
/// </summary>
192192
IReadOnlyList<IPullRequestCheckViewModel> Checks { get; }
193193

194-
/// <summary>
195-
/// Flag that indicates if there are checks or statuses to display.
196-
/// </summary>
197-
bool HasChecks { get; }
198-
199194
/// <summary>
200195
/// Initializes the view model.
201196
/// </summary>

src/GitHub.VisualStudio.UI/Views/GitHubPane/PullRequestDetailView.xaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,7 @@
248248
HeaderText="Checks"
249249
IsExpanded="True"
250250
Margin="0 8 0 0"
251-
ghfvs:ScrollingVerticalStackPanel.IsFixed="true"
252-
Visibility="{Binding HasChecks, Converter={ghfvs:BooleanToVisibilityConverter}}">
251+
ghfvs:ScrollingVerticalStackPanel.IsFixed="true">
253252
<ItemsControl ItemsSource="{Binding Checks}" Margin="0 4 12 4">
254253
<ItemsControl.ItemsPanel>
255254
<ItemsPanelTemplate>

0 commit comments

Comments
 (0)