Skip to content

Commit 9244a1f

Browse files
authored
Code Quality: Fixed an issue where folder background image would remain when navigating to Home page (#15862)
1 parent a93d04f commit 9244a1f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/Files.App/ViewModels/ShellViewModel.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1811,6 +1811,12 @@ private void GetDesktopIniFileData()
18111811

18121812
public void CheckForBackgroundImage()
18131813
{
1814+
if (WorkingDirectory == "Home")
1815+
{
1816+
FolderBackgroundImageSource = null;
1817+
return;
1818+
}
1819+
18141820
var filesAppSection = DesktopIni?.FirstOrDefault(x => x.SectionName == "FilesApp");
18151821
if (filesAppSection is null || folderSettings.LayoutMode is FolderLayoutModes.ColumnView)
18161822
{

src/Files.App/Views/HomePage.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ protected override async void OnNavigatedTo(NavigationEventArgs e)
5252

5353
// Set path of working directory empty
5454
await AppInstance.ShellViewModel.SetWorkingDirectoryAsync("Home");
55+
AppInstance.ShellViewModel.CheckForBackgroundImage();
5556

5657
AppInstance.SlimContentPage?.StatusBarViewModel.UpdateGitInfo(false, string.Empty, null);
5758

0 commit comments

Comments
 (0)