Skip to content

Commit b911357

Browse files
authored
Fix folder contents not shown & selected layout mode not updated (#4196)
1 parent 9a83f56 commit b911357

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Files/ViewModels/FolderSettingsViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ public static LayoutPreferences GetLayoutPreferencesForPath(string folderPath)
416416
if (App.AppSettings.AreLayoutPreferencesPerFolder)
417417
{
418418
var layoutPrefs = ReadLayoutPreferencesFromAds(folderPath.TrimEnd('\\'));
419-
return layoutPrefs ?? ReadLayoutPreferencesFromSettings(folderPath.Replace('\\', '_'));
419+
return layoutPrefs ?? ReadLayoutPreferencesFromSettings(folderPath.TrimEnd('\\').Replace('\\', '_'));
420420
}
421421

422422
return LayoutPreferences.DefaultLayoutPreferences;
@@ -430,7 +430,7 @@ public void UpdateLayoutPreferencesForPath(string folderPath, LayoutPreferences
430430
// include an '\\' at the end (unlike paths to folders)
431431
if (!WriteLayoutPreferencesToAds(folderPath.TrimEnd('\\'), prefs))
432432
{
433-
WriteLayoutPreferencesToSettings(folderPath.Replace('\\', '_'), prefs);
433+
WriteLayoutPreferencesToSettings(folderPath.TrimEnd('\\').Replace('\\', '_'), prefs);
434434
}
435435
}
436436
else

Files/Views/ModernShellPage.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@
252252
InvertSelectionInvokedCommand="{x:Bind InteractionOperations.InvertContentPageSelction, Mode=OneWay}"
253253
ClearSelectionInvokedCommand="{x:Bind InteractionOperations.ClearContentPageSelection, Mode=OneWay}"
254254

255-
LayoutModeInformation="{x:Bind FolderSettings.LayoutModeInformation}"
255+
LayoutModeInformation="{x:Bind FolderSettings.LayoutModeInformation, Mode=OneWay}"
256256
ToggleLayoutModeDetailsView="{x:Bind FolderSettings.ToggleLayoutModeDetailsView}"
257257
ToggleLayoutModeTiles="{x:Bind FolderSettings.ToggleLayoutModeTiles}"
258258
ToggleLayoutModeGridViewSmall="{x:Bind FolderSettings.ToggleLayoutModeGridViewSmall}"

0 commit comments

Comments
 (0)