Skip to content

Commit

Permalink
Fix: Fixed issue where unpin from start didn't work (#12193)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcofranzen99 authored Apr 28, 2023
1 parent 8dfa8e3 commit c4a6dbe
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Files.App/Actions/Start/UnpinFromStartAction.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
// Copyright (c) 2023 Files Community
// Licensed under the MIT License. See the LICENSE.

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 @@ -25,11 +21,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 c4a6dbe

Please sign in to comment.