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

Commit 3f70f80

Browse files
committed
Revert "Merge pull request #64 from shiftkey/checked-does-not-propagate"
This reverts commit a523bf9, reversing changes made to 56511e5.
1 parent 2da1349 commit 3f70f80

File tree

1 file changed

+1
-27
lines changed

1 file changed

+1
-27
lines changed

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

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -30,33 +30,7 @@ public RepositoryPublishControl()
3030
d(this.Bind(ViewModel, vm => vm.RepositoryName, v => v.nameText.Text));
3131

3232
d(this.Bind(ViewModel, vm => vm.Description, v => v.description.Text));
33-
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-
44-
// BEGIN DANGER ZONE
45-
//
46-
// This replaces the default Bind behaviour as the Checkbox control
47-
// does not raise an event here when it is hosted in the Team Explorer
48-
// view.
49-
//
50-
// We've used this.Bind in other places (popups) so it's something
51-
// we need to investigate further
52-
//
53-
d(Observable.FromEventPattern<RoutedEventArgs>(makePrivate, "Checked")
54-
.Subscribe(_ => ViewModel.KeepPrivate = true));
55-
d(Observable.FromEventPattern<RoutedEventArgs>(makePrivate, "Unchecked")
56-
.Subscribe(_ => ViewModel.KeepPrivate = false));
57-
// END DANGER ZONE
58-
59-
33+
d(this.Bind(ViewModel, vm => vm.KeepPrivate, v => v.makePrivate.IsChecked));
6034
d(this.OneWayBind(ViewModel, vm => vm.CanKeepPrivate, v => v.makePrivate.IsEnabled));
6135

6236
//d(this.OneWayBind(ViewModel, vm => vm.ShowUpgradeToMicroPlanWarning, v => v.upgradeToMicroPlanWarning.Visibility));

0 commit comments

Comments
 (0)