Skip to content

Commit 463e1d5

Browse files
committed
merge main into here
2 parents 6bc2077 + b337e2c commit 463e1d5

File tree

163 files changed

+859
-851
lines changed

Some content is hidden

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

163 files changed

+859
-851
lines changed

src/Files.App.BackgroundTasks/UpdateTask.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ namespace Files.App.BackgroundTasks
1313
{
1414
public sealed class UpdateTask : IBackgroundTask
1515
{
16-
public async void Run(IBackgroundTaskInstance taskInstance)
16+
public async void Run(IBackgroundTaskInstance taskInstance) => await RunAsync(taskInstance);
17+
18+
private async Task RunAsync(IBackgroundTaskInstance taskInstance)
1719
{
1820
var deferral = taskInstance.GetDeferral();
1921

2022
// Refresh jump list to update string resources
21-
try { await RefreshJumpList(); } catch { }
23+
try { await RefreshJumpListAsync(); } catch { }
2224

2325
// Delete previous version log files
2426
try { DeleteLogFiles(); } catch { }
@@ -32,7 +34,7 @@ private void DeleteLogFiles()
3234
File.Delete(Path.Combine(ApplicationData.Current.LocalFolder.Path, "debug_fulltrust.log"));
3335
}
3436

35-
private async Task RefreshJumpList()
37+
private async Task RefreshJumpListAsync()
3638
{
3739
if (JumpList.IsSupported())
3840
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public DecompressArchive()
2323

2424
public override Task ExecuteAsync()
2525
{
26-
return DecompressHelper.DecompressArchive(context.ShellPage);
26+
return DecompressHelper.DecompressArchiveAsync(context.ShellPage);
2727
}
2828

2929
protected override bool CanDecompressInsideArchive()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public DecompressArchiveHere()
1717

1818
public override Task ExecuteAsync()
1919
{
20-
return DecompressHelper.DecompressArchiveHere(context.ShellPage);
20+
return DecompressHelper.DecompressArchiveHereAsync(context.ShellPage);
2121
}
2222
}
2323
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public DecompressArchiveToChildFolderAction()
1717

1818
public override Task ExecuteAsync()
1919
{
20-
return DecompressHelper.DecompressArchiveToChildFolder(context.ShellPage);
20+
return DecompressHelper.DecompressArchiveToChildFolderAsync(context.ShellPage);
2121
}
2222

2323
protected override void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e)

src/Files.App/Actions/Content/Background/SetAsLockscreenBackgroundAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public override RichGlyph Glyph
2121
public override Task ExecuteAsync()
2222
{
2323
if (context.SelectedItem is not null)
24-
WallpaperHelpers.SetAsBackground(WallpaperType.LockScreen, context.SelectedItem.ItemPath);
24+
WallpaperHelpers.SetAsBackgroundAsync(WallpaperType.LockScreen, context.SelectedItem.ItemPath);
2525

2626
return Task.CompletedTask;
2727
}

src/Files.App/Actions/Content/Background/SetAsWallpaperBackgroundAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public override RichGlyph Glyph
2121
public override Task ExecuteAsync()
2222
{
2323
if (context.SelectedItem is not null)
24-
WallpaperHelpers.SetAsBackground(WallpaperType.Desktop, context.SelectedItem.ItemPath);
24+
WallpaperHelpers.SetAsBackgroundAsync(WallpaperType.Desktop, context.SelectedItem.ItemPath);
2525

2626
return Task.CompletedTask;
2727
}

src/Files.App/Actions/Content/ImageManipulation/BaseRotateAction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ public BaseRotateAction()
3434
public async Task ExecuteAsync()
3535
{
3636
foreach (var image in context.SelectedItems)
37-
await BitmapHelper.Rotate(PathNormalization.NormalizePath(image.ItemPath), Rotation);
37+
await BitmapHelper.RotateAsync(PathNormalization.NormalizePath(image.ItemPath), Rotation);
3838

3939
context.ShellPage?.SlimContentPage?.ItemManipulationModel?.RefreshItemsThumbnail();
4040

41-
await _previewPaneViewModel.UpdateSelectedItemPreview();
41+
await _previewPaneViewModel.UpdateSelectedItemPreviewAsync();
4242
}
4343

4444
private bool IsContextPageTypeAdaptedToCommand()

src/Files.App/Actions/Content/PlayAllAction.cs

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

3333
public Task ExecuteAsync()
3434
{
35-
return NavigationHelpers.OpenSelectedItems(context.ShellPage!);
35+
return NavigationHelpers.OpenSelectedItemsAsync(context.ShellPage!);
3636
}
3737

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

src/Files.App/Actions/Content/PreviewPopup/LaunchPreviewPopupAction.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,18 @@ public async Task ExecuteAsync()
3737
if (provider is null)
3838
return;
3939

40-
await provider.TogglePreviewPopup(context.SelectedItem!.ItemPath);
40+
await provider.TogglePreviewPopupAsync(context.SelectedItem!.ItemPath);
4141
}
4242

43-
private async Task SwitchPopupPreview()
43+
private async Task SwitchPopupPreviewAsync()
4444
{
4545
if (IsExecutable)
4646
{
4747
var provider = await previewPopupService.GetProviderAsync();
4848
if (provider is null)
4949
return;
5050

51-
await provider.SwitchPreview(context.SelectedItem!.ItemPath);
51+
await provider.SwitchPreviewAsync(context.SelectedItem!.ItemPath);
5252
}
5353
}
5454

@@ -58,7 +58,7 @@ public void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e)
5858
{
5959
case nameof(IContentPageContext.SelectedItems):
6060
OnPropertyChanged(nameof(IsExecutable));
61-
var _ = SwitchPopupPreview();
61+
var _ = SwitchPopupPreviewAsync();
6262
break;
6363
}
6464
}

src/Files.App/Actions/Content/RefreshItemsAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public RefreshItemsAction()
3434

3535
public async Task ExecuteAsync()
3636
{
37-
context.ShellPage?.Refresh_Click();
37+
context.ShellPage?.Refresh_ClickAsync();
3838
}
3939

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

src/Files.App/Actions/Favorites/PinItemAction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ public async Task ExecuteAsync()
4040
{
4141
var items = context.SelectedItems.Select(x => x.ItemPath).ToArray();
4242

43-
await service.PinToSidebar(items);
43+
await service.PinToSidebarAsync(items);
4444
}
4545
else if (context.Folder is not null)
4646
{
47-
await service.PinToSidebar(context.Folder.ItemPath);
47+
await service.PinToSidebarAsync(context.Folder.ItemPath);
4848
}
4949
}
5050

src/Files.App/Actions/Favorites/UnpinItemAction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ public async Task ExecuteAsync()
3838
if (context.HasSelection)
3939
{
4040
var items = context.SelectedItems.Select(x => x.ItemPath).ToArray();
41-
await service.UnpinFromSidebar(items);
41+
await service.UnpinFromSidebarAsync(items);
4242
}
4343
else if (context.Folder is not null)
4444
{
45-
await service.UnpinFromSidebar(context.Folder.ItemPath);
45+
await service.UnpinFromSidebarAsync(context.Folder.ItemPath);
4646
}
4747
}
4848

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public async Task ExecuteAsync()
4141
}
4242
else if (viewModel.ResultType.ItemType != AddItemDialogItemType.Cancel)
4343
{
44-
await UIFilesystemHelpers.CreateFileFromDialogResultType(
44+
await UIFilesystemHelpers.CreateFileFromDialogResultTypeAsync(
4545
viewModel.ResultType.ItemType,
4646
viewModel.ResultType.ItemInfo,
4747
context.ShellPage!);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public BaseDeleteAction()
2424
context.PropertyChanged += Context_PropertyChanged;
2525
}
2626

27-
protected async Task DeleteItems(bool permanently)
27+
protected async Task DeleteItemsAsync(bool permanently)
2828
{
2929
var items =
3030
context.SelectedItems.Select(item =>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public CopyItemAction()
3232
public Task ExecuteAsync()
3333
{
3434
if (context.ShellPage is not null)
35-
return UIFilesystemHelpers.CopyItem(context.ShellPage);
35+
return UIFilesystemHelpers.CopyItemAsync(context.ShellPage);
3636

3737
return Task.CompletedTask;
3838
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ public Task ExecuteAsync()
3030
{
3131
if (context.ShellPage?.SlimContentPage is not null)
3232
{
33-
var path = context.ShellPage.SlimContentPage.SelectedItem is not null
34-
? context.ShellPage.SlimContentPage.SelectedItem.ItemPath
33+
var path = context.ShellPage.SlimContentPage.SelectedItems is not null
34+
? context.ShellPage.SlimContentPage.SelectedItems.Select(x => x.ItemPath).Aggregate((accum, current) => accum + "\n" + current)
3535
: context.ShellPage.FilesystemViewModel.WorkingDirectory;
3636

3737
if (FtpHelpers.IsFtpPath(path))

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public CreateFolderAction()
3333
public Task ExecuteAsync()
3434
{
3535
if (context.ShellPage is not null)
36-
UIFilesystemHelpers.CreateFileFromDialogResultType(AddItemDialogItemType.Folder, null!, context.ShellPage);
36+
UIFilesystemHelpers.CreateFileFromDialogResultTypeAsync(AddItemDialogItemType.Folder, null!, context.ShellPage);
3737

3838
return Task.CompletedTask;
3939
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public CutItemAction()
3232
public Task ExecuteAsync()
3333
{
3434
return context.ShellPage is not null
35-
? UIFilesystemHelpers.CutItem(context.ShellPage)
35+
? UIFilesystemHelpers.CutItemAsync(context.ShellPage)
3636
: Task.CompletedTask;
3737
}
3838

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public HotKey SecondHotKey
2222

2323
public Task ExecuteAsync()
2424
{
25-
return DeleteItems(false);
25+
return DeleteItemsAsync(false);
2626
}
2727
}
2828
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public HotKey HotKey
1616

1717
public Task ExecuteAsync()
1818
{
19-
return DeleteItems(true);
19+
return DeleteItemsAsync(true);
2020
}
2121
}
2222
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public EmptyRecycleBinAction()
3030

3131
public async Task ExecuteAsync()
3232
{
33-
await RecycleBinHelpers.EmptyRecycleBin();
33+
await RecycleBinHelpers.EmptyRecycleBinAsync();
3434
}
3535

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

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public OpenItemAction()
3939

4040
public Task ExecuteAsync()
4141
{
42-
return NavigationHelpers.OpenSelectedItems(context.ShellPage);
42+
return NavigationHelpers.OpenSelectedItemsAsync(context.ShellPage);
4343
}
4444

4545
private void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e)
@@ -77,7 +77,7 @@ public OpenItemWithApplicationPickerAction()
7777

7878
public Task ExecuteAsync()
7979
{
80-
return NavigationHelpers.OpenSelectedItems(context.ShellPage, true);
80+
return NavigationHelpers.OpenSelectedItemsAsync(context.ShellPage, true);
8181
}
8282

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public RichGlyph Glyph
2020

2121
public async Task ExecuteAsync()
2222
{
23-
await RecycleBinHelpers.RestoreRecycleBin();
23+
await RecycleBinHelpers.RestoreRecycleBinAsync();
2424
}
2525
}
2626
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public RestoreRecycleBinAction()
3131
public async Task ExecuteAsync()
3232
{
3333
if (context.ShellPage is not null)
34-
await RecycleBinHelpers.RestoreSelectionRecycleBin(context.ShellPage);
34+
await RecycleBinHelpers.RestoreSelectionRecycleBinAsync(context.ShellPage);
3535
}
3636

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

src/Files.App/Actions/Git/GitInitAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public GitInitAction()
2727

2828
public Task ExecuteAsync()
2929
{
30-
return GitHelpers.InitializeRepository(_context.Folder?.ItemPath);
30+
return GitHelpers.InitializeRepositoryAsync(_context.Folder?.ItemPath);
3131
}
3232

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

src/Files.App/Actions/Git/GitPullAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public GitPullAction()
2828

2929
public Task ExecuteAsync()
3030
{
31-
return GitHelpers.PullOrigin(_context.ShellPage!.InstanceViewModel.GitRepositoryPath);
31+
return GitHelpers.PullOriginAsync(_context.ShellPage!.InstanceViewModel.GitRepositoryPath);
3232
}
3333

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

src/Files.App/Actions/Git/GitPushAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public GitPushAction()
2525

2626
public Task ExecuteAsync()
2727
{
28-
return GitHelpers.PushToOrigin(
28+
return GitHelpers.PushToOriginAsync(
2929
_context.ShellPage?.InstanceViewModel.GitRepositoryPath,
3030
_context.ShellPage?.InstanceViewModel.GitBranchName);
3131
}

src/Files.App/Actions/Git/GitSyncAction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ public Task ExecuteAsync()
2727
{
2828
var instance = _context.ShellPage?.InstanceViewModel;
2929

30-
return GitHelpers.PullOrigin(instance?.GitRepositoryPath)
31-
.ContinueWith(t => GitHelpers.PushToOrigin(
30+
return GitHelpers.PullOriginAsync(instance?.GitRepositoryPath)
31+
.ContinueWith(t => GitHelpers.PushToOriginAsync(
3232
instance?.GitRepositoryPath,
3333
instance?.GitBranchName));
3434
}

src/Files.App/Actions/Navigation/DuplicateCurrentTabAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public async Task ExecuteAsync()
2727
if (arguments is null)
2828
await mainPageViewModel.AddNewTabByPathAsync(typeof(PaneHolderPage), "Home");
2929
else
30-
await mainPageViewModel.AddNewTabByParam(arguments.InitialPageType, arguments.NavigationParameter, context.CurrentTabIndex + 1);
30+
await mainPageViewModel.AddNewTabByParamAsync(arguments.InitialPageType, arguments.NavigationParameter, context.CurrentTabIndex + 1);
3131
}
3232
}
3333
}

src/Files.App/Actions/Navigation/DuplicateSelectedTabAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public async Task ExecuteAsync()
3030
if (arguments is null)
3131
await mainPageViewModel.AddNewTabByPathAsync(typeof(PaneHolderPage), "Home");
3232
else
33-
await mainPageViewModel.AddNewTabByParam(arguments.InitialPageType, arguments.NavigationParameter, context.SelectedTabIndex + 1);
33+
await mainPageViewModel.AddNewTabByParamAsync(arguments.InitialPageType, arguments.NavigationParameter, context.SelectedTabIndex + 1);
3434
}
3535
}
3636
}

src/Files.App/Actions/Navigation/ReopenClosedTabAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public ReopenClosedTabAction()
3333

3434
public Task ExecuteAsync()
3535
{
36-
context.Control!.ReopenClosedTab();
36+
context.Control!.ReopenClosedTabAsync();
3737

3838
return Task.CompletedTask;
3939
}

src/Files.App/App.xaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundPressed" Color="{StaticResource SubtleFillColorTertiary}" />
4747
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundPointerOver" Color="{StaticResource SubtleFillColorSecondary}" />
4848

49-
<Color x:Key="AppThemeFillColorAttention">#0070CB</Color>
50-
<SolidColorBrush x:Key="AppThemeFillColorAttentionBrush" Color="{StaticResource AppThemeFillColorAttention}" />
49+
<Color x:Key="App.Theme.FillColorAttention">#0070CB</Color>
50+
<SolidColorBrush x:Key="App.Theme.FillColorAttentionBrush" Color="{StaticResource App.Theme.FillColorAttention}" />
5151
</ResourceDictionary>
5252
<ResourceDictionary x:Key="Dark">
5353
<SolidColorBrush x:Key="App.Theme.BackgroundBrush" Color="Transparent" />
@@ -60,8 +60,8 @@
6060
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundPressed" Color="{StaticResource SubtleFillColorTertiary}" />
6161
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundPointerOver" Color="{StaticResource SubtleFillColorSecondary}" />
6262

63-
<Color x:Key="AppThemeFillColorAttention">#50C0FF</Color>
64-
<SolidColorBrush x:Key="AppThemeFillColorAttentionBrush" Color="{StaticResource AppThemeFillColorAttention}" />
63+
<Color x:Key="App.Theme.FillColorAttention">#50C0FF</Color>
64+
<SolidColorBrush x:Key="App.Theme.FillColorAttentionBrush" Color="{StaticResource App.Theme.FillColorAttention}" />
6565
</ResourceDictionary>
6666
<ResourceDictionary x:Key="HighContrast">
6767
<SolidColorBrush x:Key="App.Theme.BackgroundBrush" Color="Transparent" />
@@ -74,8 +74,8 @@
7474
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundPressed" Color="{StaticResource SystemColorHighlightColor}" />
7575
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundPointerOver" Color="{StaticResource SystemColorHighlightColor}" />
7676

77-
<Color x:Key="AppThemeFillColorAttention">#50C0FF</Color>
78-
<SolidColorBrush x:Key="AppThemeFillColorAttentionBrush" Color="{StaticResource AppThemeFillColorAttention}" />
77+
<Color x:Key="App.Theme.FillColorAttention">#50C0FF</Color>
78+
<SolidColorBrush x:Key="App.Theme.FillColorAttentionBrush" Color="{StaticResource App.Theme.FillColorAttention}" />
7979
</ResourceDictionary>
8080
</ResourceDictionary.ThemeDictionaries>
8181
</ResourceDictionary>

0 commit comments

Comments
 (0)