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
}

0 commit comments

Comments
 (0)