Skip to content

Commit

Permalink
Feature: Added option to pin recycle bin to the start menu (#10921)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hark64 authored Jan 4, 2023
1 parent 2d1f8c1 commit 3f319f7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Files.App/Helpers/ContextFlyoutItemHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseLayoutMenuItems(Curren
Text = "PinItemToStart/Text".GetLocalizedResource(),
Glyph = "\uE840",
Command = commandsViewModel.PinItemToStartCommand,
ShowInRecycleBin = true,
ShowInFtpPage = true,
ShowOnShift = true,
ShowItem = itemViewModel.CurrentFolder is not null && !itemViewModel.CurrentFolder.IsItemPinnedToStart,
Expand All @@ -565,6 +566,7 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseLayoutMenuItems(Curren
Text = "UnpinItemFromStart/Text".GetLocalizedResource(),
Glyph = "\uE77A",
Command = commandsViewModel.UnpinItemFromStartCommand,
ShowInRecycleBin = true,
ShowInFtpPage = true,
ShowOnShift = true,
ShowItem = itemViewModel.CurrentFolder is not null && itemViewModel.CurrentFolder.IsItemPinnedToStart,
Expand Down Expand Up @@ -981,6 +983,7 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(BaseLayo
Command = commandsViewModel.PinItemToStartCommand,
ShowOnShift = true,
ShowItem = selectedItems.All(x => !x.IsShortcut && (x.PrimaryItemAttribute == StorageItemTypes.Folder || x.IsExecutable) && !x.IsArchive && !x.IsItemPinnedToStart),
ShowInRecycleBin = true,
ShowInSearchPage = true,
ShowInFtpPage = true,
SingleItemOnly = true,
Expand All @@ -992,6 +995,7 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(BaseLayo
Command = commandsViewModel.UnpinItemFromStartCommand,
ShowOnShift = true,
ShowItem = selectedItems.All(x => !x.IsShortcut && (x.PrimaryItemAttribute == StorageItemTypes.Folder || x.IsExecutable) && !x.IsArchive && x.IsItemPinnedToStart),
ShowInRecycleBin = true,
ShowInSearchPage = true,
ShowInFtpPage = true,
SingleItemOnly = true,
Expand Down

0 comments on commit 3f319f7

Please sign in to comment.