Skip to content

Commit 6038b2c

Browse files
committed
Req
1 parent 6090039 commit 6038b2c

File tree

4 files changed

+2
-13
lines changed

4 files changed

+2
-13
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ public override RichGlyph Glyph
2222

2323
public override Task ExecuteAsync(object? parameter = null)
2424
{
25-
if (ContentPageContext.SelectedItem is not null)
26-
AppearanceSettingsService.AppThemeBackgroundImageSource = ContentPageContext.SelectedItem.ItemPath;
25+
AppearanceSettingsService.AppThemeBackgroundImageSource = ContentPageContext.SelectedItem.ItemPath;
2726

2827
return Task.CompletedTask;
2928
}

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ public override RichGlyph Glyph
2424

2525
public override Task ExecuteAsync(object? parameter = null)
2626
{
27-
if (ContentPageContext.SelectedItem is null)
28-
return Task.CompletedTask;
29-
3027
try
3128
{
3229
return WindowsWallpaperService.SetLockScreenWallpaper(ContentPageContext.SelectedItem.ItemPath);

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,9 @@ public override RichGlyph Glyph
2424

2525
public override Task ExecuteAsync(object? parameter = null)
2626
{
27-
if (ContentPageContext.SelectedItems.Count <= 1)
28-
return Task.CompletedTask;
29-
30-
var paths = ContentPageContext.SelectedItems.Select(item => item.ItemPath).ToArray();
31-
3227
try
3328
{
29+
var paths = ContentPageContext.SelectedItems.Select(item => item.ItemPath).ToArray();
3430
WindowsWallpaperService.SetDesktopSlideshow(paths);
3531
}
3632
catch (Exception ex)

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ public override RichGlyph Glyph
2222

2323
public override Task ExecuteAsync(object? parameter = null)
2424
{
25-
if (ContentPageContext.SelectedItem is null)
26-
return Task.CompletedTask;
27-
2825
try
2926
{
3027
WindowsWallpaperService.SetDesktopWallpaper(ContentPageContext.SelectedItem.ItemPath);

0 commit comments

Comments
 (0)