Skip to content

Commit

Permalink
Fix: Fixed issue where unpin from start didn't work (files-community#…
Browse files Browse the repository at this point in the history
  • Loading branch information
marcofranzen99 authored and hishitetsu committed Apr 30, 2023
1 parent dc2b242 commit 8bc1d45
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Files.App/Actions/Start/UnpinFromStartAction.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using CommunityToolkit.Mvvm.DependencyInjection;
using Files.App.Commands;
using Files.App.Contexts;
using Files.App.Extensions;
using Files.App.Filesystem;
using System.Threading.Tasks;

namespace Files.App.Actions
{
Expand All @@ -22,11 +19,11 @@ public async Task ExecuteAsync()
if (context.SelectedItems.Count > 0)
{
foreach (ListedItem listedItem in context.ShellPage?.SlimContentPage.SelectedItems)
await App.SecondaryTileHelper.TryPinFolderAsync(listedItem.ItemPath, listedItem.Name);
await App.SecondaryTileHelper.UnpinFromStartAsync(listedItem.ItemPath);
}
else
{
await App.SecondaryTileHelper.TryPinFolderAsync(context.ShellPage?.FilesystemViewModel.CurrentFolder.ItemPath, context.ShellPage?.FilesystemViewModel.CurrentFolder.Name);
await App.SecondaryTileHelper.UnpinFromStartAsync(context.ShellPage?.FilesystemViewModel.CurrentFolder.ItemPath);
}
}
}
Expand Down

0 comments on commit 8bc1d45

Please sign in to comment.