This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed
GitHub.VisualStudio/TeamExplorer/Sync Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -293,15 +293,19 @@ protected virtual void Dispose(bool disposing)
293293 if ( disposing )
294294 {
295295 if ( disposed ) return ;
296+ disposed = true ;
296297
297- Debug . WriteLine ( "Disposing ({0})" , GetHashCode ( ) ) ;
298- disposables . Dispose ( ) ;
299- transition ? . Dispose ( ) ;
300- completion ? . Dispose ( ) ;
301298 if ( connectionAdded != null )
302299 connectionManager . Connections . CollectionChanged -= connectionAdded ;
303300 connectionAdded = null ;
304- disposed = true ;
301+
302+ var tr = transition ;
303+ var cmp = completion ;
304+ transition = null ;
305+ completion = null ;
306+ disposables . Dispose ( ) ;
307+ tr ? . Dispose ( ) ;
308+ cmp ? . Dispose ( ) ;
305309 }
306310 }
307311
Original file line number Diff line number Diff line change @@ -117,10 +117,13 @@ void ShowPublish()
117117 disposable = uiflow ;
118118 var ui = uiflow . Value ;
119119 var creation = ui . SelectFlow ( UIControllerFlow . Publish ) ;
120- ui . ListenToCompletionState ( ) . Subscribe ( done =>
120+ bool success = false ;
121+ ui . ListenToCompletionState ( ) . Subscribe ( s => success = s , ( ) =>
121122 {
123+ // there's no real cancel button in the publish form, but if support a back button there, then we want to hide the form
122124 IsVisible = false ;
123- ServiceProvider . TryGetService < ITeamExplorer > ( ) ? . NavigateToPage ( new Guid ( TeamExplorerPageIds . Home ) , null ) ;
125+ if ( success )
126+ ServiceProvider . TryGetService < ITeamExplorer > ( ) ? . NavigateToPage ( new Guid ( TeamExplorerPageIds . Home ) , null ) ;
124127 } ) ;
125128
126129 creation . Subscribe ( c =>
You can’t perform that action at this time.
0 commit comments