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

Commit dd310da

Browse files
committed
and keep the view in sync with any VM changes
1 parent b6a9b8f commit dd310da

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/GitHub.VisualStudio/UI/Views/Controls/RepositoryPublishControl.xaml.cs

+10
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ public RepositoryPublishControl()
3131

3232
d(this.Bind(ViewModel, vm => vm.Description, v => v.description.Text));
3333

34+
d(this.WhenAnyValue(x => x.ViewModel.KeepPrivate)
35+
.Subscribe(keepPrivate =>
36+
{
37+
// because we removed this.Bind, set this by hand
38+
if (keepPrivate != makePrivate.IsChecked)
39+
{
40+
makePrivate.IsChecked = keepPrivate;
41+
}
42+
}));
43+
3444
// BEGIN DANGER ZONE
3545
//
3646
// This replaces the default Bind behaviour as the Checkbox control

0 commit comments

Comments
 (0)