mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-24 04:00:02 +01:00
cleanup for review
This commit is contained in:
@@ -231,8 +231,6 @@ public sealed class CommandProviderWrapper : ICommandProviderContext
|
||||
var ourContext = GetProviderContext();
|
||||
var makeAndAdd = (ICommandItem? i, bool fallback) =>
|
||||
{
|
||||
// n.b. Mike, you may want to revisit this after the dock stuff merges,
|
||||
// because I think we'll need to pass a contextMenuFactory to dock items
|
||||
CommandItemViewModel commandItemViewModel = new(new(i), pageContext, contextMenuFactory: contextMenuFactory);
|
||||
TopLevelViewModel topLevelViewModel = new(commandItemViewModel, fallback, ExtensionHost, ourContext, settings, providerSettings, serviceProvider, i);
|
||||
topLevelViewModel.InitializeProperties();
|
||||
|
||||
@@ -7,6 +7,12 @@ using Microsoft.CmdPal.Core.ViewModels;
|
||||
|
||||
namespace Microsoft.CmdPal.UI.ViewModels;
|
||||
|
||||
/// <summary>
|
||||
/// Used as the PageContext for top-level items. Top level items are displayed
|
||||
/// on the MainListPage, which _we_ own. We need to have a placeholder page
|
||||
/// context for each provider that still connects those top-level items to the
|
||||
/// CommandProvider they came from.
|
||||
/// </summary>
|
||||
public partial class TopLevelItemPageContext : IPageContext
|
||||
{
|
||||
public TaskScheduler Scheduler { get; private set; }
|
||||
|
||||
@@ -37,8 +37,8 @@ internal sealed partial class CommandPaletteContextMenuFactory : IContextMenuFac
|
||||
page.ProviderContext.SupportsPinning &&
|
||||
!string.IsNullOrEmpty(itemId))
|
||||
{
|
||||
// TODO: #45201 Here, we'll want to add pin/unpin commands for pinning
|
||||
// items to the top-level or to the dock.
|
||||
// Add pin/unpin commands for pinning items to the top-level or to
|
||||
// the dock.
|
||||
var providerId = page.ProviderContext.ProviderId;
|
||||
if (_topLevelCommandManager.LookupProvider(providerId) is CommandProviderWrapper provider)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
eii<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="$(RepoRoot)src\Common.Dotnet.CsWinRT.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
Reference in New Issue
Block a user