Skip to content

Commit 17d1b5c

Browse files
committed
Change to INestedStorable
1 parent 3bea105 commit 17d1b5c

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/Files.App/Data/Items/ShelfItem.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace Files.App.Data.Items
77
{
88
[Bindable(true)]
9-
public sealed partial class ShelfItem : ObservableObject, IWrapper<IStorable>, IAsyncInitialize
9+
public sealed partial class ShelfItem : ObservableObject, IWrapper<INestedStorable>, IAsyncInitialize
1010
{
1111
private readonly IImageService _imageService;
1212
private readonly ICollection<ShelfItem> _sourceCollection;
@@ -16,9 +16,9 @@ public sealed partial class ShelfItem : ObservableObject, IWrapper<IStorable>, I
1616
[ObservableProperty] private string? _Path;
1717

1818
/// <inheritdoc/>
19-
public IStorable Inner { get; }
19+
public INestedStorable Inner { get; }
2020

21-
public ShelfItem(IStorable storable, ICollection<ShelfItem> sourceCollection, IImage? icon = null)
21+
public ShelfItem(INestedStorable storable, ICollection<ShelfItem> sourceCollection, IImage? icon = null)
2222
{
2323
_imageService = Ioc.Default.GetRequiredService<IImageService>();
2424
_sourceCollection = sourceCollection;
@@ -35,7 +35,7 @@ public async Task InitAsync(CancellationToken cancellationToken = default)
3535
}
3636

3737
[RelayCommand]
38-
private void Remove()
38+
public void Remove()
3939
{
4040
_sourceCollection.Remove(this);
4141
}

src/Files.App/UserControls/Pane/ShelfPane.xaml.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
// Copyright (c) Files Community
22
// Licensed under the MIT License.
33

4-
using System.Runtime.InteropServices;
54
using Microsoft.UI.Xaml;
65
using Microsoft.UI.Xaml.Controls;
7-
using System.Runtime.InteropServices.ComTypes;
86
using System.Windows.Input;
97
using Vanara.PInvoke;
10-
using Windows.ApplicationModel.DataTransfer;
118
using Vanara.Windows.Shell;
9+
using Windows.ApplicationModel.DataTransfer;
1210
using WinRT;
1311
using DragEventArgs = Microsoft.UI.Xaml.DragEventArgs;
1412

@@ -52,8 +50,8 @@ private async void Shelf_Drop(object sender, DragEventArgs e)
5250

5351
var storable = item switch
5452
{
55-
StorageFileWithPath => (IStorable?)await storageService.TryGetFileAsync(item.Path),
56-
StorageFolderWithPath => (IStorable?)await storageService.TryGetFolderAsync(item.Path),
53+
StorageFileWithPath => (INestedStorable?)await storageService.TryGetFileAsync(item.Path),
54+
StorageFolderWithPath => (INestedStorable?)await storageService.TryGetFolderAsync(item.Path),
5755
_ => null
5856
};
5957

0 commit comments

Comments
 (0)