Skip to content

Commit 19cd70d

Browse files
committed
Move rating prompt to actual usage area
1 parent 5fafd88 commit 19cd70d

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/GitHubActionsVSPackage.cs

+2-5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
namespace GitHubActionsVS;
1212
[PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)]
13+
[ProvideAutoLoad(VSConstants.UICONTEXT.SolutionHasSingleProject_string, PackageAutoLoadFlags.BackgroundLoad)]
14+
[ProvideAutoLoad(VSConstants.UICONTEXT.SolutionHasMultipleProjects_string, PackageAutoLoadFlags.BackgroundLoad)]
1315
[InstalledProductRegistration(Vsix.Name, Vsix.Description, Vsix.Version)]
1416
[ProvideToolWindow(typeof(ActionsToolWindow.Pane), Style = VsDockStyle.Tabbed, Window = WindowGuids.SolutionExplorer)]
1517
[ProvideOptionPage(typeof(OptionsProvider.ExtensionOptionsOptions), "GitHub", "Actions", 0, 0, true, SupportsProfiles = true)]
@@ -33,11 +35,6 @@ protected override async Task InitializeAsync(CancellationToken cancellationToke
3335

3436
await this.RegisterCommandsAsync();
3537

36-
// Setup ratings prompt
37-
ExtensionOptions options = await ExtensionOptions.GetLiveInstanceAsync();
38-
RatingPrompt prompt = new("TimHeuer.GitHubActionsVS", Vsix.Name, options);
39-
prompt.RegisterSuccessfulUsage();
40-
4138
this.RegisterToolWindows();
4239
}
4340

src/ToolWindows/GHActionsToolWindow.xaml.cs

+6
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public partial class GHActionsToolWindow : UserControl
3131

3232
public GHActionsToolWindow(ToolWindowMessenger toolWindowMessenger)
3333
{
34+
3435
_toolWindowMessenger = toolWindowMessenger ??= new();
3536
toolWindowMessenger.MessageReceived += OnMessageReceived;
3637
InitializeComponent();
@@ -154,6 +155,11 @@ private void ClearTreeViews()
154155

155156
private async Task LoadDataAsync()
156157
{
158+
// Setup ratings prompt
159+
ExtensionOptions options = await ExtensionOptions.GetLiveInstanceAsync();
160+
RatingPrompt prompt = new("TimHeuer.GitHubActionsVS", Vsix.Name, options, 4);
161+
prompt.RegisterSuccessfulUsage();
162+
157163
MessageArea.Visibility = Visibility.Collapsed;
158164
ActionsInfoPanel.Visibility = Visibility.Visible;
159165

0 commit comments

Comments
 (0)