This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +7
-19
lines changed
Expand file tree Collapse file tree 4 files changed +7
-19
lines changed Original file line number Diff line number Diff line change @@ -31,11 +31,5 @@ public async void Activate([AllowNull]object data = null)
3131
3232 await UsageTracker . IncrementOpenInGitHubCount ( ) ;
3333 }
34-
35- public bool CanShow ( )
36- {
37- var githubRepoCheckTask = IsGitHubRepo ( ) ;
38- return githubRepoCheckTask . Wait ( 250 ) ? githubRepoCheckTask . Result : false ;
39- }
4034 }
4135}
Original file line number Diff line number Diff line change @@ -40,12 +40,5 @@ public async void Activate([AllowNull]object data = null)
4040 ns ? . ShowMessage ( Resources . Error_FailedToCopyToClipboard ) ;
4141 }
4242 }
43-
44- public bool CanShow ( )
45- {
46- var githubRepoCheckTask = IsGitHubRepo ( ) ;
47- return githubRepoCheckTask . Wait ( 250 ) ? githubRepoCheckTask . Result : false ;
48- }
49-
5043 }
5144}
Original file line number Diff line number Diff line change @@ -26,5 +26,12 @@ protected Task<UriString> GenerateLink(LinkType linkType)
2626 return null ;
2727 return repo . GenerateUrl ( linkType , activeDocument . Name , activeDocument . StartLine , activeDocument . EndLine ) ;
2828 }
29+
30+ public bool CanShow ( )
31+ {
32+ var githubRepoCheckTask = IsGitHubRepo ( ) ;
33+ //Set max of 250ms wait time to prevent UI blocking
34+ return githubRepoCheckTask . Wait ( 250 ) ? githubRepoCheckTask . Result : false ;
35+ }
2936 }
3037}
Original file line number Diff line number Diff line change @@ -29,11 +29,5 @@ public async void Activate([AllowNull]object data = null)
2929
3030 await UsageTracker . IncrementOpenInGitHubCount ( ) ;
3131 }
32-
33- public bool CanShow ( )
34- {
35- var githubRepoCheckTask = IsGitHubRepo ( ) ;
36- return githubRepoCheckTask . Wait ( 250 ) ? githubRepoCheckTask . Result : false ;
37- }
3832 }
3933}
You can’t perform that action at this time.
0 commit comments