Skip to content

Commit

Permalink
Move rating prompt to actual usage area
Browse files Browse the repository at this point in the history
  • Loading branch information
timheuer committed Jan 27, 2024
1 parent 5fafd88 commit 19cd70d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/GitHubActionsVSPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

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

await this.RegisterCommandsAsync();

// Setup ratings prompt
ExtensionOptions options = await ExtensionOptions.GetLiveInstanceAsync();
RatingPrompt prompt = new("TimHeuer.GitHubActionsVS", Vsix.Name, options);
prompt.RegisterSuccessfulUsage();

this.RegisterToolWindows();
}

Expand Down
6 changes: 6 additions & 0 deletions src/ToolWindows/GHActionsToolWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public partial class GHActionsToolWindow : UserControl

public GHActionsToolWindow(ToolWindowMessenger toolWindowMessenger)
{

_toolWindowMessenger = toolWindowMessenger ??= new();
toolWindowMessenger.MessageReceived += OnMessageReceived;
InitializeComponent();
Expand Down Expand Up @@ -154,6 +155,11 @@ private void ClearTreeViews()

private async Task LoadDataAsync()
{
// Setup ratings prompt
ExtensionOptions options = await ExtensionOptions.GetLiveInstanceAsync();
RatingPrompt prompt = new("TimHeuer.GitHubActionsVS", Vsix.Name, options, 4);
prompt.RegisterSuccessfulUsage();

MessageArea.Visibility = Visibility.Collapsed;
ActionsInfoPanel.Visibility = Visibility.Visible;

Expand Down

0 comments on commit 19cd70d

Please sign in to comment.