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

Commit 9885bad

Browse files
committed
Ignore glitch where section starts invisible
If no events arrive default to invisible. Watch the topmost section.
1 parent 567d490 commit 9885bad

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/GitHub.TeamFoundation.14/Services/VSGitServices.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ await teamExplorer
122122
.WhenAnyValue(x => x.CurrentPage)
123123
.Where(p => p.GetId() == new Guid(TeamExplorerPageIds.Home))
124124
.Select(p => p.GetSection(sectionId))
125-
.SelectMany(s => s.WhenAnyValue(x => x.IsVisible))
125+
.Where(s => s != null)
126+
.Select(s => s.WhenAnyValue(x => x.IsVisible))
127+
.Switch() // Watch the topmost section
128+
.StartWith(false) // If no events arrive default to invisible
129+
.Throttle(TimeSpan.FromSeconds(1)) // Ignore glitch where section starts invisible
126130
.Any(x => x == false);
127131
}
128132

0 commit comments

Comments
 (0)