diff --git a/src/Files.App/UserControls/Sidebar/SidebarItem.cs b/src/Files.App/UserControls/Sidebar/SidebarItem.cs index 886dc9aee631..0f0402cc064f 100644 --- a/src/Files.App/UserControls/Sidebar/SidebarItem.cs +++ b/src/Files.App/UserControls/Sidebar/SidebarItem.cs @@ -433,11 +433,7 @@ private async void ItemBorder_Drop(object sender, DragEventArgs e) { UpdatePointerState(); if (Owner is not null) - { - var deferral = e.GetDeferral(); await Owner.RaiseItemDropped(this, DetermineDropTargetPosition(e), e); - deferral.Complete(); - } } private SidebarItemDropPosition DetermineDropTargetPosition(DragEventArgs args) diff --git a/src/Files.App/ViewModels/UserControls/SidebarViewModel.cs b/src/Files.App/ViewModels/UserControls/SidebarViewModel.cs index aa044643c51b..54325eb6c25e 100644 --- a/src/Files.App/ViewModels/UserControls/SidebarViewModel.cs +++ b/src/Files.App/ViewModels/UserControls/SidebarViewModel.cs @@ -1243,18 +1243,20 @@ private async Task HandleTagItemDragOverAsync(FileTagItem tagItem, ItemDragOverE args.RawEvent.Handled = true; - var storageItems = await Utils.Storage.FilesystemHelpers.GetDraggedStorageItems(args.DroppedItem); - - if (!storageItems.Any()) - { - args.RawEvent.AcceptedOperation = DataPackageOperation.None; - } - else - { - args.RawEvent.DragUIOverride.IsCaptionVisible = true; - args.RawEvent.DragUIOverride.Caption = string.Format("LinkToFolderCaptionText".GetLocalizedResource(), tagItem.Text); - args.RawEvent.AcceptedOperation = DataPackageOperation.Link; - } + // Comment out the code for dropping to Tags section as it is currently not supported. + + //var storageItems = await Utils.Storage.FilesystemHelpers.GetDraggedStorageItems(args.DroppedItem); + + //if (!storageItems.Any()) + //{ + args.RawEvent.AcceptedOperation = DataPackageOperation.None; + //} + //else + //{ + // args.RawEvent.DragUIOverride.IsCaptionVisible = true; + // args.RawEvent.DragUIOverride.Caption = string.Format("LinkToFolderCaptionText".GetLocalizedResource(), tagItem.Text); + // args.RawEvent.AcceptedOperation = DataPackageOperation.Link; + //} } @@ -1264,8 +1266,11 @@ public async Task HandleItemDroppedAsync(ItemDroppedEventArgs args) await HandleLocationItemDroppedAsync(locationItem, args); else if (args.DropTarget is DriveItem driveItem) await HandleDriveItemDroppedAsync(driveItem, args); - else if (args.DropTarget is FileTagItem fileTagItem) - await HandleTagItemDroppedAsync(fileTagItem, args); + + // Comment out the code for dropping to Tags section as it is currently not supported. + + //else if (args.DropTarget is FileTagItem fileTagItem) + // await HandleTagItemDroppedAsync(fileTagItem, args); } private async Task HandleLocationItemDroppedAsync(LocationItem locationItem, ItemDroppedEventArgs args) @@ -1293,6 +1298,7 @@ private Task HandleDriveItemDroppedAsync(DriveItem driveItem, Item return FilesystemHelpers.PerformOperationTypeAsync(args.RawEvent.AcceptedOperation, args.RawEvent.DataView, driveItem.Path, false, true); } + // TODO: This method effectively does nothing. We need to implement the functionality for dropping to Tags section. private async Task HandleTagItemDroppedAsync(FileTagItem fileTagItem, ItemDroppedEventArgs args) { var storageItems = await Utils.Storage.FilesystemHelpers.GetDraggedStorageItems(args.DroppedItem);