From d40640c8bc0d372189f112a49eee86ef7769c0a4 Mon Sep 17 00:00:00 2001 From: hishitetsu <66369541+hishitetsu@users.noreply.github.com> Date: Thu, 25 Jul 2024 10:47:14 +0900 Subject: [PATCH] Remove background image in Home page --- src/Files.App/ViewModels/ShellViewModel.cs | 6 ++++++ src/Files.App/Views/HomePage.xaml.cs | 1 + 2 files changed, 7 insertions(+) diff --git a/src/Files.App/ViewModels/ShellViewModel.cs b/src/Files.App/ViewModels/ShellViewModel.cs index ae80f21eb389..4c96640f0732 100644 --- a/src/Files.App/ViewModels/ShellViewModel.cs +++ b/src/Files.App/ViewModels/ShellViewModel.cs @@ -1811,6 +1811,12 @@ private void GetDesktopIniFileData() public void CheckForBackgroundImage() { + if (WorkingDirectory == "Home") + { + FolderBackgroundImageSource = null; + return; + } + var filesAppSection = DesktopIni?.FirstOrDefault(x => x.SectionName == "FilesApp"); if (filesAppSection is null || folderSettings.LayoutMode is FolderLayoutModes.ColumnView) { diff --git a/src/Files.App/Views/HomePage.xaml.cs b/src/Files.App/Views/HomePage.xaml.cs index f77b0d8b7fa3..0a121a6c1dc0 100644 --- a/src/Files.App/Views/HomePage.xaml.cs +++ b/src/Files.App/Views/HomePage.xaml.cs @@ -52,6 +52,7 @@ protected override async void OnNavigatedTo(NavigationEventArgs e) // Set path of working directory empty await AppInstance.ShellViewModel.SetWorkingDirectoryAsync("Home"); + AppInstance.ShellViewModel.CheckForBackgroundImage(); AppInstance.SlimContentPage?.StatusBarViewModel.UpdateGitInfo(false, string.Empty, null);