Repository: files-community/Files
File: src/Files.App/Helpers/Layout/LayoutPreferencesManager.cs (C#)

Code before:
		}

		public Type GetLayoutType(string path, bool changeLayoutMode = true)
		{
			var preferencesItem = GetLayoutPreferencesForPath(path);
			if (preferencesItem is null)
				return typeof(DetailsLayoutPage);

			if (changeLayoutMode)
			{
				IsLayoutModeChanging = LayoutPreferencesItem.LayoutMode != preferencesItem.LayoutMode;
				LayoutPreferencesItem = preferencesItem;
			}

			return (preferencesItem.LayoutMode) switch
			{
				FolderLayoutModes.DetailsView => typeof(DetailsLayoutPage),
				FolderLayoutModes.ListView => typeof(GridLayoutPage),
				FolderLayoutModes.TilesView => typeof(GridLayoutPage),
				FolderLayoutModes.GridView => typeof(GridLayoutPage),
				FolderLayoutModes.ColumnView => typeof(ColumnsLayoutPage),
				_ => typeof(DetailsLayoutPage)
			};
		}

		public void UpdateGroupAndSortOptions(string? path)
		{
			if (string.IsNullOrWhiteSpace(path))
				return;

			var preferencesItem = GetLayoutPreferencesForPath(path);
			if (preferencesItem is null)
				return;

			DirectorySortOption = preferencesItem.DirectorySortOption;
			DirectorySortDirection = preferencesItem.DirectorySortDirection;
			DirectoryGroupOption = preferencesItem.DirectoryGroupOption;
			DirectoryGroupByDateUnit = preferencesItem.DirectoryGroupByDateUnit;
			DirectoryGroupDirection = preferencesItem.DirectoryGroupDirection;
			SortDirectoriesAlongsideFiles = preferencesItem.SortDirectoriesAlongsideFiles;
			SortFilesFirst = preferencesItem.SortFilesFirst;
		}

		public bool IsPathUsingDefaultLayout(string? path)
		{
			return UserSettingsService.LayoutSettingsService.SyncFolderPreferencesAcrossDirectories ||
				string.IsNullOrEmpty(path) ||
				GetLayoutPreferencesFromDatabase(path, Win32Helper.GetFolderFRN(path)) is null;
		}

		public void ToggleLayoutModeColumnView(bool manuallySet)

Review comment (suggestion):
```suggestion
		public void ReloadGroupAndSortPreferences(string? path)
```

Code after:
		}

		public Type GetLayoutType(string path, bool changeLayoutMode = true)
		{
			var preferencesItem = GetLayoutPreferencesForPath(path);
			if (preferencesItem is null)
				return typeof(DetailsLayoutPage);

			if (changeLayoutMode)
			{
				IsLayoutModeChanging = LayoutPreferencesItem.LayoutMode != preferencesItem.LayoutMode;
				LayoutPreferencesItem = preferencesItem;
			}

			return (preferencesItem.LayoutMode) switch
			{
				FolderLayoutModes.DetailsView => typeof(DetailsLayoutPage),
				FolderLayoutModes.ListView => typeof(GridLayoutPage),
				FolderLayoutModes.TilesView => typeof(GridLayoutPage),
				FolderLayoutModes.GridView => typeof(GridLayoutPage),
				FolderLayoutModes.ColumnView => typeof(ColumnsLayoutPage),
				_ => typeof(DetailsLayoutPage)
			};
		}

		public void ReloadGroupAndSortPreferences(string? path)
		{
			if (string.IsNullOrWhiteSpace(path))
				return;

			var preferencesItem = GetLayoutPreferencesForPath(path);
			if (preferencesItem is null)
				return;

			DirectorySortOption = preferencesItem.DirectorySortOption;
			DirectorySortDirection = preferencesItem.DirectorySortDirection;
			DirectoryGroupOption = preferencesItem.DirectoryGroupOption;
			DirectoryGroupByDateUnit = preferencesItem.DirectoryGroupByDateUnit;
			DirectoryGroupDirection = preferencesItem.DirectoryGroupDirection;
			SortDirectoriesAlongsideFiles = preferencesItem.SortDirectoriesAlongsideFiles;
			SortFilesFirst = preferencesItem.SortFilesFirst;
		}

		public bool IsPathUsingDefaultLayout(string? path)
		{
			return UserSettingsService.LayoutSettingsService.SyncFolderPreferencesAcrossDirectories ||
				string.IsNullOrEmpty(path) ||
				GetLayoutPreferencesFromDatabase(path, Win32Helper.GetFolderFRN(path)) is null;
		}

		public void ToggleLayoutModeColumnView(bool manuallySet)