Skip to content

Commit

Permalink
Small change
Browse files Browse the repository at this point in the history
  • Loading branch information
gave92 committed Jun 19, 2021
1 parent a20bbce commit 2734390
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
13 changes: 10 additions & 3 deletions Files/Interacts/BaseLayoutCommandImplementationModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,16 @@ public virtual async void DragOver(DragEventArgs e)
}
else if (!draggedItems.Any())
{
e.DragUIOverride.IsCaptionVisible = true;
e.DragUIOverride.Caption = string.Format("CopyToFolderCaptionText".GetLocalized(), folderName);
e.AcceptedOperation = DataPackageOperation.Copy;
if (pwd.StartsWith(App.AppSettings.RecycleBinPath))
{
e.AcceptedOperation = DataPackageOperation.None;
}
else
{
e.DragUIOverride.IsCaptionVisible = true;
e.DragUIOverride.Caption = string.Format("CopyToFolderCaptionText".GetLocalized(), folderName);
e.AcceptedOperation = DataPackageOperation.Copy;
}
}
else
{
Expand Down
13 changes: 10 additions & 3 deletions Files/UserControls/SidebarControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,16 @@ private async void NavigationViewLocationItem_DragOver(object sender, DragEventA
}
else if (!storageItems.Any())
{
e.DragUIOverride.IsCaptionVisible = true;
e.DragUIOverride.Caption = string.Format("CopyToFolderCaptionText".GetLocalized(), locationItem.Text);
e.AcceptedOperation = DataPackageOperation.Copy;
if (locationItem.Path.StartsWith(App.AppSettings.RecycleBinPath))
{
e.AcceptedOperation = DataPackageOperation.None;
}
else
{
e.DragUIOverride.IsCaptionVisible = true;
e.DragUIOverride.Caption = string.Format("CopyToFolderCaptionText".GetLocalized(), locationItem.Text);
e.AcceptedOperation = DataPackageOperation.Copy;
}
}
else
{
Expand Down

0 comments on commit 2734390

Please sign in to comment.