Skip to content

Commit c4a6dbe

Browse files
Fix: Fixed issue where unpin from start didn't work (#12193)
1 parent 8dfa8e3 commit c4a6dbe

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/Files.App/Actions/Start/UnpinFromStartAction.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
// Copyright (c) 2023 Files Community
22
// Licensed under the MIT License. See the LICENSE.
33

4-
using CommunityToolkit.Mvvm.DependencyInjection;
54
using Files.App.Commands;
65
using Files.App.Contexts;
7-
using Files.App.Extensions;
8-
using Files.App.Filesystem;
9-
using System.Threading.Tasks;
106

117
namespace Files.App.Actions
128
{
@@ -25,11 +21,11 @@ public async Task ExecuteAsync()
2521
if (context.SelectedItems.Count > 0)
2622
{
2723
foreach (ListedItem listedItem in context.ShellPage?.SlimContentPage.SelectedItems)
28-
await App.SecondaryTileHelper.TryPinFolderAsync(listedItem.ItemPath, listedItem.Name);
24+
await App.SecondaryTileHelper.UnpinFromStartAsync(listedItem.ItemPath);
2925
}
3026
else
3127
{
32-
await App.SecondaryTileHelper.TryPinFolderAsync(context.ShellPage?.FilesystemViewModel.CurrentFolder.ItemPath, context.ShellPage?.FilesystemViewModel.CurrentFolder.Name);
28+
await App.SecondaryTileHelper.UnpinFromStartAsync(context.ShellPage?.FilesystemViewModel.CurrentFolder.ItemPath);
3329
}
3430
}
3531
}

0 commit comments

Comments
 (0)