This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed
src/GitHub.App/ViewModels/GitHubPane Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -684,7 +684,11 @@ async Task DoSyncSubmodules(object unused)
684684 usageTracker . IncrementCounter ( x => x . NumberOfSyncSubmodules ) . Forget ( ) ;
685685
686686 var writer = new StringWriter ( CultureInfo . CurrentCulture ) ;
687- var complete = await pullRequestsService . SyncSubmodules ( LocalRepository , writer . WriteLine ) ;
687+ var complete = await pullRequestsService . SyncSubmodules ( LocalRepository , line =>
688+ {
689+ writer . WriteLine ( line ) ;
690+ SetStatus ( line ) ;
691+ } ) ;
688692 if ( ! complete )
689693 {
690694 throw new ApplicationException ( writer . ToString ( ) ) ;
@@ -693,6 +697,27 @@ async Task DoSyncSubmodules(object unused)
693697 finally
694698 {
695699 IsBusy = false ;
700+ SetStatus ( ) ;
701+ }
702+ }
703+
704+ // HACK: This should probably be a `Status` property on `IPanePageViewModel`.
705+ void SetStatus ( string line = null )
706+ {
707+ try
708+ {
709+ if ( line != null )
710+ {
711+ VisualStudio . Services . Dte . StatusBar . Text = line ;
712+ }
713+ else
714+ {
715+ VisualStudio . Services . Dte . StatusBar . Clear ( ) ;
716+ }
717+ }
718+ catch ( Exception e )
719+ {
720+ log . Error ( e , "Error writing to StatusBar" ) ;
696721 }
697722 }
698723
You can’t perform that action at this time.
0 commit comments