Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
d2dyno1 committed Feb 15, 2025
1 parent 17d1b5c commit 6875bdb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
22 changes: 11 additions & 11 deletions src/Files.App/UserControls/Pane/ShelfPane.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,23 +65,23 @@ private async void Shelf_Drop(object sender, DragEventArgs e)
}
}

private void ListView_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
{
var apidl = SafetyExtensions.IgnoreExceptions(() => e.Items
.Cast<ShelfItem>()
.Select(x => new ShellItem(x.Inner.Id).PIDL)
.ToArray());
private void ListView_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
{
var apidl = SafetyExtensions.IgnoreExceptions(() => e.Items
.Cast<ShelfItem>()
.Select(x => new ShellItem(x.Inner.Id).PIDL)
.ToArray());

if (apidl is null)
return;
if (apidl is null)
return;

if (!Shell32.SHGetDesktopFolder(out var pDesktop).Succeeded)
if (!Shell32.SHGetDesktopFolder(out var pDesktop).Succeeded)
return;

if (!Shell32.SHGetIDListFromObject(pDesktop, out var pDesktopPidl).Succeeded)
if (!Shell32.SHGetIDListFromObject(pDesktop, out var pDesktopPidl).Succeeded)
return;

e.Data.Properties["Files_ActionBinder"] = "Files_ShelfBinder";
e.Data.Properties["Files_ActionBinder"] = "Files_ShelfBinder";
if (!Shell32.SHCreateDataObject(pDesktopPidl, apidl, null, out var ppDataObject).Succeeded)
return;

Expand Down
8 changes: 4 additions & 4 deletions src/Files.App/ViewModels/Layouts/BaseLayoutViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public async Task DragOverAsync(DragEventArgs e)
{
// As long as one file doesn't already belong to this folder
if (_associatedInstance.InstanceViewModel.IsPageTypeSearchResults || draggedItems.Any() &&
draggedItems.AreItemsAlreadyInFolder(_associatedInstance.ShellViewModel.WorkingDirectory))
draggedItems.AreItemsAlreadyInFolder(_associatedInstance.ShellViewModel.WorkingDirectory))
{
e.AcceptedOperation = DataPackageOperation.None;
}
Expand Down Expand Up @@ -157,9 +157,9 @@ public async Task DragOverAsync(DragEventArgs e)
e.AcceptedOperation = DataPackageOperation.Move | DataPackageOperation.Copy;
}
else if (draggedItems.Any(x =>
x.Item is ZipStorageFile ||
x.Item is ZipStorageFolder) ||
ZipStorageFolder.IsZipPath(pwd))
x.Item is ZipStorageFile ||
x.Item is ZipStorageFolder) ||
ZipStorageFolder.IsZipPath(pwd))
{
e.DragUIOverride.Caption = string.Format("CopyToFolderCaptionText".GetLocalizedResource(), folderName);
e.AcceptedOperation = DataPackageOperation.Copy;
Expand Down

0 comments on commit 6875bdb

Please sign in to comment.