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)
293
293
if ( disposing )
294
294
{
295
295
if ( disposed ) return ;
296
+ disposed = true ;
296
297
297
- Debug . WriteLine ( "Disposing ({0})" , GetHashCode ( ) ) ;
298
- disposables . Dispose ( ) ;
299
- transition ? . Dispose ( ) ;
300
- completion ? . Dispose ( ) ;
301
298
if ( connectionAdded != null )
302
299
connectionManager . Connections . CollectionChanged -= connectionAdded ;
303
300
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 ( ) ;
305
309
}
306
310
}
307
311
Original file line number Diff line number Diff line change @@ -117,10 +117,13 @@ void ShowPublish()
117
117
disposable = uiflow ;
118
118
var ui = uiflow . Value ;
119
119
var creation = ui . SelectFlow ( UIControllerFlow . Publish ) ;
120
- ui . ListenToCompletionState ( ) . Subscribe ( done =>
120
+ bool success = false ;
121
+ ui . ListenToCompletionState ( ) . Subscribe ( s => success = s , ( ) =>
121
122
{
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
122
124
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 ) ;
124
127
} ) ;
125
128
126
129
creation . Subscribe ( c =>
You can’t perform that action at this time.
0 commit comments