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 +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 11using System ;
22using System . Threading ;
33using System . Runtime . InteropServices ;
4- using GitHub . Helpers ;
4+ using GitHub . Logging ;
55using GitHub . Services ;
66using GitHub . VisualStudio ;
77using GitHub . InlineReviews . Services ;
88using Microsoft . VisualStudio . Shell ;
9+ using Serilog ;
910using Task = System . Threading . Tasks . Task ;
1011
1112namespace GitHub . InlineReviews
@@ -15,6 +16,8 @@ namespace GitHub.InlineReviews
1516 [ ProvideAutoLoad ( Guids . UIContext_Git , PackageAutoLoadFlags . BackgroundLoad ) ]
1617 public class PullRequestStatusBarPackage : AsyncPackage
1718 {
19+ static readonly ILogger log = LogManager . ForContext < PullRequestStatusBarPackage > ( ) ;
20+
1821 /// <summary>
1922 /// Initialize the PR status UI on Visual Studio's status bar.
2023 /// </summary>
@@ -24,7 +27,12 @@ protected override async Task InitializeAsync(CancellationToken cancellationToke
2427 var serviceProvider = ( IGitHubServiceProvider ) await GetServiceAsync ( typeof ( IGitHubServiceProvider ) ) ;
2528 var barManager = new PullRequestStatusBarManager ( usageTracker , serviceProvider ) ;
2629
27- await ThreadingHelper . SwitchToMainThreadAsync ( ) ;
30+ log . Information ( "SwitchToMainThreadAsync" ) ;
31+ await JoinableTaskFactory
32+ . WithPriority ( VsTaskRunContext . UIThreadNormalPriority )
33+ . SwitchToMainThreadAsync ( ) ;
34+
35+ log . Information ( "StartShowingStatus" ) ;
2836 barManager . StartShowingStatus ( ) ;
2937 }
3038 }
You can’t perform that action at this time.
0 commit comments