Skip to content

Commit 62148d4

Browse files
authored
Merge branch 'main' into terminal
2 parents bb3d854 + 9ee8447 commit 62148d4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+273
-241
lines changed

src/Files.App/Actions/Content/Archives/Compress/BaseCompressArchiveAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ protected void GetDestination(out string[] sources, out string directory, out st
3535
if (sources.Length is not 0)
3636
{
3737
// Get the current directory path
38-
directory = context.ShellPage.FilesystemViewModel.WorkingDirectory.Normalize();
38+
directory = context.ShellPage.ShellViewModel.WorkingDirectory.Normalize();
3939

4040
// Get the library save folder if the folder is library item
4141
if (App.LibraryManager.TryGetLibrary(directory, out var library) && !library.IsEmpty)

src/Files.App/Actions/Content/Archives/Decompress/BaseDecompressArchiveAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ protected async Task DecompressArchiveHereAsync(bool smart = false)
5555
{
5656
var password = string.Empty;
5757
BaseStorageFile archive = await StorageHelpers.ToStorageItem<BaseStorageFile>(selectedItem.ItemPath);
58-
BaseStorageFolder currentFolder = await StorageHelpers.ToStorageItem<BaseStorageFolder>(context.ShellPage?.FilesystemViewModel.CurrentFolder?.ItemPath ?? string.Empty);
58+
BaseStorageFolder currentFolder = await StorageHelpers.ToStorageItem<BaseStorageFolder>(context.ShellPage?.ShellViewModel.CurrentFolder?.ItemPath ?? string.Empty);
5959

6060
if (archive?.Path is null)
6161
return;

src/Files.App/Actions/Content/Archives/Decompress/DecompressArchiveToChildFolderAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public override async Task ExecuteAsync(object? parameter = null)
3131
var password = string.Empty;
3232

3333
BaseStorageFile archive = await StorageHelpers.ToStorageItem<BaseStorageFile>(selectedItem.ItemPath);
34-
BaseStorageFolder currentFolder = await StorageHelpers.ToStorageItem<BaseStorageFolder>(context.ShellPage?.FilesystemViewModel.CurrentFolder.ItemPath);
34+
BaseStorageFolder currentFolder = await StorageHelpers.ToStorageItem<BaseStorageFolder>(context.ShellPage?.ShellViewModel.CurrentFolder.ItemPath);
3535
BaseStorageFolder destinationFolder = null;
3636

3737
if (archive?.Path is null)

src/Files.App/Actions/Content/Selection/SelectAllAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public bool IsExecutable
3030
if (page is null)
3131
return false;
3232

33-
int itemCount = page.FilesystemViewModel.FilesAndFolders.Count;
33+
int itemCount = page.ShellViewModel.FilesAndFolders.Count;
3434
int selectedItemCount = context.SelectedItems.Count;
3535
if (itemCount == selectedItemCount)
3636
return false;

src/Files.App/Actions/FileSystem/BaseDeleteAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ item.PrimaryItemAttribute is StorageItemTypes.File
3737
if (context.ShellPage is IShellPage shellPage)
3838
{
3939
await shellPage.FilesystemHelpers.DeleteItemsAsync(items, settings.DeleteConfirmationPolicy, permanently, true);
40-
await shellPage.FilesystemViewModel.ApplyFilesAndFoldersChangesAsync();
40+
await shellPage.ShellViewModel.ApplyFilesAndFoldersChangesAsync();
4141
}
4242
}
4343

src/Files.App/Actions/FileSystem/CopyPathAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public Task ExecuteAsync(object? parameter = null)
3535
{
3636
var path = context.ShellPage.SlimContentPage.SelectedItems is not null
3737
? context.ShellPage.SlimContentPage.SelectedItems.Select(x => x.ItemPath).Aggregate((accum, current) => accum + "\n" + current)
38-
: context.ShellPage.FilesystemViewModel.WorkingDirectory;
38+
: context.ShellPage.ShellViewModel.WorkingDirectory;
3939

4040
if (FtpHelpers.IsFtpPath(path))
4141
path = path.Replace("\\", "/", StringComparison.Ordinal);

src/Files.App/Actions/FileSystem/CopyPathWithQuotesAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public Task ExecuteAsync(object? parameter = null)
3636
var selectedItems = context.ShellPage.SlimContentPage.SelectedItems;
3737
var path = selectedItems is not null
3838
? string.Join("\n", selectedItems.Select(item => $"\"{item.ItemPath}\""))
39-
: context.ShellPage.FilesystemViewModel.WorkingDirectory;
39+
: context.ShellPage.ShellViewModel.WorkingDirectory;
4040

4141
if (FtpHelpers.IsFtpPath(path))
4242
path = path.Replace("\\", "/", StringComparison.Ordinal);

src/Files.App/Actions/FileSystem/OpenFileLocationAction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public OpenFileLocationAction()
3232

3333
public async Task ExecuteAsync(object? parameter = null)
3434
{
35-
if (context.ShellPage?.FilesystemViewModel is null)
35+
if (context.ShellPage?.ShellViewModel is null)
3636
return;
3737

3838
var item = context.SelectedItem as ShortcutItem;
@@ -42,7 +42,7 @@ public async Task ExecuteAsync(object? parameter = null)
4242

4343
// Check if destination path exists
4444
var folderPath = Path.GetDirectoryName(item.TargetPath);
45-
var destFolder = await context.ShellPage.FilesystemViewModel.GetFolderWithPathFromPathAsync(folderPath);
45+
var destFolder = await context.ShellPage.ShellViewModel.GetFolderWithPathFromPathAsync(folderPath);
4646

4747
if (destFolder)
4848
{

src/Files.App/Actions/FileSystem/PasteItemAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public async Task ExecuteAsync(object? parameter = null)
4343
if (context.ShellPage is null)
4444
return;
4545

46-
string path = context.ShellPage.FilesystemViewModel.WorkingDirectory;
46+
string path = context.ShellPage.ShellViewModel.WorkingDirectory;
4747
await UIFilesystemHelpers.PasteItemAsync(path, context.ShellPage);
4848
}
4949

src/Files.App/Actions/FileSystem/PasteItemToSelectionAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public async Task ExecuteAsync(object? parameter = null)
3737

3838
string path = context.SelectedItem is ListedItem selectedItem
3939
? selectedItem.ItemPath
40-
: context.ShellPage.FilesystemViewModel.WorkingDirectory;
40+
: context.ShellPage.ShellViewModel.WorkingDirectory;
4141

4242
await UIFilesystemHelpers.PasteItemAsync(path, context.ShellPage);
4343
}

src/Files.App/Actions/Open/OpenInVSCodeAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public OpenInVSCodeAction()
3232

3333
public Task ExecuteAsync(object? parameter = null)
3434
{
35-
return Win32Helper.RunPowershellCommandAsync($"code \'{_context.ShellPage?.FilesystemViewModel.WorkingDirectory}\'", false);
35+
return Win32Helper.RunPowershellCommandAsync($"code \'{_context.ShellPage?.ShellViewModel.WorkingDirectory}\'", false);
3636
}
3737

3838
private void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e)

src/Files.App/Actions/Start/PinToStartAction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ public async Task ExecuteAsync(object? parameter = null)
4545
await StartMenuService.PinAsync(storable, listedItem.Name);
4646
}
4747
}
48-
else if (context.ShellPage?.FilesystemViewModel?.CurrentFolder is not null)
48+
else if (context.ShellPage?.ShellViewModel?.CurrentFolder is not null)
4949
{
50-
var currentFolder = context.ShellPage.FilesystemViewModel.CurrentFolder;
50+
var currentFolder = context.ShellPage.ShellViewModel.CurrentFolder;
5151
var folder = await StorageService.GetFolderAsync(currentFolder.ItemPath);
5252

5353
await StartMenuService.PinAsync(folder, currentFolder.Name);

src/Files.App/Actions/Start/UnpinFromStartAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public async Task ExecuteAsync(object? parameter = null)
4343
}
4444
else
4545
{
46-
var currentFolder = context.ShellPage.FilesystemViewModel.CurrentFolder;
46+
var currentFolder = context.ShellPage.ShellViewModel.CurrentFolder;
4747
var folder = await StorageService.GetFolderAsync(currentFolder.ItemPath);
4848

4949
await StartMenuService.UnpinAsync(folder);

src/Files.App/Data/Contexts/ContentPage/ContentPageContext.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ internal sealed class ContentPageContext : ObservableObject, IContentPageContext
1212

1313
private readonly IMultiPanesContext context = Ioc.Default.GetRequiredService<IMultiPanesContext>();
1414

15-
private ItemViewModel? filesystemViewModel;
15+
private ShellViewModel? filesystemViewModel;
1616

1717
public IShellPage? ShellPage => context?.ActivePaneOrColumn;
1818

@@ -21,7 +21,7 @@ internal sealed class ContentPageContext : ObservableObject, IContentPageContext
2121
private ContentPageTypes pageType = ContentPageTypes.None;
2222
public ContentPageTypes PageType => pageType;
2323

24-
public ListedItem? Folder => ShellPage?.FilesystemViewModel?.CurrentFolder;
24+
public ListedItem? Folder => ShellPage?.ShellViewModel?.CurrentFolder;
2525

2626
public bool HasItem => ShellPage?.ToolbarViewModel?.HasItem ?? false;
2727

@@ -51,7 +51,7 @@ internal sealed class ContentPageContext : ObservableObject, IContentPageContext
5151

5252
public bool CanExecuteGitAction => IsGitRepository && !GitHelpers.IsExecutingGitAction;
5353

54-
public string? SolutionFilePath => ShellPage?.FilesystemViewModel?.SolutionFilePath;
54+
public string? SolutionFilePath => ShellPage?.ShellViewModel?.SolutionFilePath;
5555

5656
public ContentPageContext()
5757
{
@@ -99,7 +99,7 @@ private void Context_Changed(object? sender, EventArgs e)
9999
page.PaneHolder.PropertyChanged += PaneHolder_PropertyChanged;
100100
}
101101

102-
filesystemViewModel = ShellPage?.FilesystemViewModel;
102+
filesystemViewModel = ShellPage?.ShellViewModel;
103103
if (filesystemViewModel is not null)
104104
filesystemViewModel.PropertyChanged += FilesystemViewModel_PropertyChanged;
105105

@@ -178,10 +178,10 @@ private void FilesystemViewModel_PropertyChanged(object? sender, PropertyChanged
178178
{
179179
switch (e.PropertyName)
180180
{
181-
case nameof(ItemViewModel.CurrentFolder):
181+
case nameof(ShellViewModel.CurrentFolder):
182182
OnPropertyChanged(nameof(Folder));
183183
break;
184-
case nameof(ItemViewModel.SolutionFilePath):
184+
case nameof(ShellViewModel.SolutionFilePath):
185185
OnPropertyChanged(nameof(SolutionFilePath));
186186
break;
187187
}

src/Files.App/Data/Contracts/IShellPage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Files.App.Data.Contracts
55
{
66
public interface IShellPage : ITabBarItemContent, IMultiPaneInfo, IDisposable, INotifyPropertyChanged
77
{
8-
ItemViewModel FilesystemViewModel { get; }
8+
ShellViewModel ShellViewModel { get; }
99

1010
CurrentInstanceViewModel InstanceViewModel { get; }
1111

src/Files.App/Data/Factories/ContentPageContextFlyoutFactory.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static class ContentPageContextFlyoutFactory
2424
private static readonly ICommandManager Commands = Ioc.Default.GetRequiredService<ICommandManager>();
2525
private static IStorageArchiveService StorageArchiveService { get; } = Ioc.Default.GetRequiredService<IStorageArchiveService>();
2626

27-
public static List<ContextMenuFlyoutItemViewModel> GetItemContextCommandsWithoutShellItems(CurrentInstanceViewModel currentInstanceViewModel, List<ListedItem> selectedItems, BaseLayoutViewModel commandsViewModel, bool shiftPressed, SelectedItemsPropertiesViewModel? selectedItemsPropertiesViewModel, ItemViewModel? itemViewModel = null)
27+
public static List<ContextMenuFlyoutItemViewModel> GetItemContextCommandsWithoutShellItems(CurrentInstanceViewModel currentInstanceViewModel, List<ListedItem> selectedItems, BaseLayoutViewModel commandsViewModel, bool shiftPressed, SelectedItemsPropertiesViewModel? selectedItemsPropertiesViewModel, ShellViewModel? itemViewModel = null)
2828
{
2929
var menuItemsList = GetBaseItemMenuItems(commandsViewModel: commandsViewModel, selectedItems: selectedItems, selectedItemsPropertiesViewModel: selectedItemsPropertiesViewModel, currentInstanceViewModel: currentInstanceViewModel, itemViewModel: itemViewModel);
3030
menuItemsList = Filter(items: menuItemsList, shiftPressed: shiftPressed, currentInstanceViewModel: currentInstanceViewModel, selectedItems: selectedItems, removeOverflowMenu: false);
@@ -80,7 +80,7 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
8080
SelectedItemsPropertiesViewModel? selectedItemsPropertiesViewModel,
8181
List<ListedItem> selectedItems,
8282
CurrentInstanceViewModel currentInstanceViewModel,
83-
ItemViewModel? itemViewModel = null)
83+
ShellViewModel? itemViewModel = null)
8484
{
8585
bool itemsSelected = itemViewModel is null;
8686
bool canDecompress = selectedItems.Any() && selectedItems.All(x => x.IsArchive)

src/Files.App/Extensions/ShellNewEntryExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public static async Task<List<ShellNewEntry>> GetNewContextMenuEntries()
3636

3737
public static async Task<FilesystemResult<BaseStorageFile>> Create(this ShellNewEntry shellEntry, string filePath, IShellPage associatedInstance)
3838
{
39-
var parentFolder = await associatedInstance.FilesystemViewModel.GetFolderFromPathAsync(PathNormalization.GetParentDir(filePath));
39+
var parentFolder = await associatedInstance.ShellViewModel.GetFolderFromPathAsync(PathNormalization.GetParentDir(filePath));
4040
if (parentFolder)
4141
{
4242
return await Create(shellEntry, parentFolder, filePath);

src/Files.App/Helpers/Dialog/DynamicDialogFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ public static DynamicDialog GetFor_RenameRequiresHigherPermissions(string path)
324324
SecondaryButtonAction = (vm, e) =>
325325
{
326326
var context = Ioc.Default.GetRequiredService<IContentPageContext>();
327-
var item = context.ShellPage?.FilesystemViewModel.FilesAndFolders.FirstOrDefault(li => li.ItemPath.Equals(path));
327+
var item = context.ShellPage?.ShellViewModel.FilesAndFolders.FirstOrDefault(li => li.ItemPath.Equals(path));
328328

329329
if (context.ShellPage is not null && item is not null)
330330
FilePropertiesHelpers.OpenPropertiesWindow(item, context.ShellPage, PropertiesNavigationViewItemType.Security);

src/Files.App/Helpers/Navigation/NavigationHelpers.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ public static Task LaunchNewWindowAsync()
277277
public static async Task OpenSelectedItemsAsync(IShellPage associatedInstance, bool openViaApplicationPicker = false)
278278
{
279279
// Don't open files and folders inside recycle bin
280-
if (associatedInstance.FilesystemViewModel.WorkingDirectory.StartsWith(Constants.UserEnvironmentPaths.RecycleBinPath, StringComparison.Ordinal) ||
280+
if (associatedInstance.ShellViewModel.WorkingDirectory.StartsWith(Constants.UserEnvironmentPaths.RecycleBinPath, StringComparison.Ordinal) ||
281281
associatedInstance.SlimContentPage?.SelectedItems is null)
282282
{
283283
return;
@@ -314,7 +314,7 @@ public static async Task OpenSelectedItemsAsync(IShellPage associatedInstance, b
314314
public static async Task OpenItemsWithExecutableAsync(IShellPage associatedInstance, IEnumerable<IStorageItemWithPath> items, string executablePath)
315315
{
316316
// Don't open files and folders inside recycle bin
317-
if (associatedInstance.FilesystemViewModel.WorkingDirectory.StartsWith(Constants.UserEnvironmentPaths.RecycleBinPath, StringComparison.Ordinal) ||
317+
if (associatedInstance.ShellViewModel.WorkingDirectory.StartsWith(Constants.UserEnvironmentPaths.RecycleBinPath, StringComparison.Ordinal) ||
318318
associatedInstance.SlimContentPage is null)
319319
return;
320320

@@ -334,7 +334,7 @@ public static async Task OpenItemsWithExecutableAsync(IShellPage associatedInsta
334334
/// <param name="forceOpenInNewTab">Open folders in a new tab regardless of the "OpenFoldersInNewTab" option</param>
335335
public static async Task<bool> OpenPath(string path, IShellPage associatedInstance, FilesystemItemType? itemType = null, bool openSilent = false, bool openViaApplicationPicker = false, IEnumerable<string>? selectItems = null, string? args = default, bool forceOpenInNewTab = false)
336336
{
337-
string previousDir = associatedInstance.FilesystemViewModel.WorkingDirectory;
337+
string previousDir = associatedInstance.ShellViewModel.WorkingDirectory;
338338
bool isHiddenItem = Win32Helper.HasFileAttribute(path, System.IO.FileAttributes.Hidden);
339339
bool isDirectory = Win32Helper.HasFileAttribute(path, System.IO.FileAttributes.Directory);
340340
bool isReparsePoint = Win32Helper.HasFileAttribute(path, System.IO.FileAttributes.ReparsePoint);
@@ -431,7 +431,7 @@ public static async Task<bool> OpenPath(string path, IShellPage associatedInstan
431431
{
432432
await DialogDisplayHelper.ShowDialogAsync("FileNotFoundDialog/Title".GetLocalizedResource(), "FileNotFoundDialog/Text".GetLocalizedResource());
433433
associatedInstance.ToolbarViewModel.CanRefresh = false;
434-
associatedInstance.FilesystemViewModel?.RefreshItems(previousDir);
434+
associatedInstance.ShellViewModel?.RefreshItems(previousDir);
435435
}
436436

437437
return opened;
@@ -485,7 +485,7 @@ private static async Task<FilesystemResult> OpenDirectory(string path, IShellPag
485485
}
486486
else
487487
{
488-
opened = await associatedInstance.FilesystemViewModel.GetFolderWithPathFromPathAsync(path)
488+
opened = await associatedInstance.ShellViewModel.GetFolderWithPathFromPathAsync(path)
489489
.OnSuccess((childFolder) =>
490490
{
491491
// Add location to Recent Items List
@@ -519,7 +519,7 @@ private static async Task<FilesystemResult> OpenFile(string path, IShellPage ass
519519
{
520520
if (!FileExtensionHelpers.IsWebLinkFile(path))
521521
{
522-
StorageFileWithPath childFile = await associatedInstance.FilesystemViewModel.GetFileWithPathFromPathAsync(shortcutInfo.TargetPath);
522+
StorageFileWithPath childFile = await associatedInstance.ShellViewModel.GetFileWithPathFromPathAsync(shortcutInfo.TargetPath);
523523
// Add location to Recent Items List
524524
if (childFile?.Item is SystemStorageFile)
525525
App.RecentItemsManager.AddToRecentItems(childFile.Path);
@@ -534,7 +534,7 @@ private static async Task<FilesystemResult> OpenFile(string path, IShellPage ass
534534
}
535535
else
536536
{
537-
opened = await associatedInstance.FilesystemViewModel.GetFileWithPathFromPathAsync(path)
537+
opened = await associatedInstance.ShellViewModel.GetFileWithPathFromPathAsync(path)
538538
.OnSuccess(async childFile =>
539539
{
540540
// Add location to Recent Items List
@@ -558,7 +558,7 @@ private static async Task<FilesystemResult> OpenFile(string path, IShellPage ass
558558
BaseStorageFileQueryResult? fileQueryResult = null;
559559

560560
//Get folder to create a file query (to pass to apps like Photos, Movies & TV..., needed to scroll through the folder like what Windows Explorer does)
561-
BaseStorageFolder currentFolder = await associatedInstance.FilesystemViewModel.GetFolderFromPathAsync(PathNormalization.GetParentDir(path));
561+
BaseStorageFolder currentFolder = await associatedInstance.ShellViewModel.GetFolderFromPathAsync(PathNormalization.GetParentDir(path));
562562

563563
if (currentFolder is not null)
564564
{

src/Files.App/Helpers/UI/UIFilesystemHelpers.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@ await associatedInstance.SlimContentPage.SelectedItems.ToList().ParallelForEachA
7070
}
7171
else if (listedItem.PrimaryItemAttribute == StorageItemTypes.File || listedItem is ZipItem)
7272
{
73-
var result = await associatedInstance.FilesystemViewModel.GetFileFromPathAsync(listedItem.ItemPath)
73+
var result = await associatedInstance.ShellViewModel.GetFileFromPathAsync(listedItem.ItemPath)
7474
.OnSuccess(t => items.Add(t));
7575

7676
if (!result)
7777
throw new IOException($"Failed to process {listedItem.ItemPath}.", (int)result.ErrorCode);
7878
}
7979
else
8080
{
81-
var result = await associatedInstance.FilesystemViewModel.GetFolderFromPathAsync(listedItem.ItemPath)
81+
var result = await associatedInstance.ShellViewModel.GetFolderFromPathAsync(listedItem.ItemPath)
8282
.OnSuccess(t => items.Add(t));
8383

8484
if (!result)
@@ -167,15 +167,15 @@ await associatedInstance.SlimContentPage.SelectedItems.ToList().ParallelForEachA
167167
}
168168
else if (listedItem.PrimaryItemAttribute == StorageItemTypes.File || listedItem is ZipItem)
169169
{
170-
var result = await associatedInstance.FilesystemViewModel.GetFileFromPathAsync(listedItem.ItemPath)
170+
var result = await associatedInstance.ShellViewModel.GetFileFromPathAsync(listedItem.ItemPath)
171171
.OnSuccess(t => items.Add(t));
172172

173173
if (!result)
174174
throw new IOException($"Failed to process {listedItem.ItemPath}.", (int)result.ErrorCode);
175175
}
176176
else
177177
{
178-
var result = await associatedInstance.FilesystemViewModel.GetFolderFromPathAsync(listedItem.ItemPath)
178+
var result = await associatedInstance.ShellViewModel.GetFolderFromPathAsync(listedItem.ItemPath)
179179
.OnSuccess(t => items.Add(t));
180180

181181
if (!result)
@@ -283,7 +283,7 @@ public static async Task CreateFileFromDialogResultTypeAsync(AddItemDialogItemTy
283283

284284
if (associatedInstance.SlimContentPage is not null)
285285
{
286-
currentPath = associatedInstance.FilesystemViewModel.WorkingDirectory;
286+
currentPath = associatedInstance.ShellViewModel.WorkingDirectory;
287287
if (App.LibraryManager.TryGetLibrary(currentPath, out var library) &&
288288
!library.IsEmpty &&
289289
library.Folders.Count == 1) // TODO: handle libraries with multiple folders
@@ -373,7 +373,7 @@ public static void SetHiddenAttributeItem(ListedItem item, bool isHidden, ItemMa
373373

374374
public static async Task CreateShortcutAsync(IShellPage? associatedInstance, IReadOnlyList<ListedItem> selectedItems)
375375
{
376-
var currentPath = associatedInstance?.FilesystemViewModel.WorkingDirectory;
376+
var currentPath = associatedInstance?.ShellViewModel.WorkingDirectory;
377377

378378
if (App.LibraryManager.TryGetLibrary(currentPath ?? string.Empty, out var library) && !library.IsEmpty)
379379
currentPath = library.DefaultSaveFolder;
@@ -393,7 +393,7 @@ public static async Task CreateShortcutAsync(IShellPage? associatedInstance, IRe
393393

394394
public static async Task CreateShortcutFromDialogAsync(IShellPage associatedInstance)
395395
{
396-
var currentPath = associatedInstance.FilesystemViewModel.WorkingDirectory;
396+
var currentPath = associatedInstance.ShellViewModel.WorkingDirectory;
397397
if (App.LibraryManager.TryGetLibrary(currentPath, out var library) &&
398398
!library.IsEmpty)
399399
{

0 commit comments

Comments
 (0)