@@ -59,6 +59,7 @@ public SidebarDisplayMode SidebarDisplayMode
59
59
if ( SetProperty ( ref sidebarDisplayMode , value ) )
60
60
{
61
61
OnPropertyChanged ( nameof ( IsSidebarCompactSize ) ) ;
62
+ OnPropertyChanged ( nameof ( AreSectionsHidden ) ) ;
62
63
IsSidebarOpen = sidebarDisplayMode == SidebarDisplayMode . Expanded ;
63
64
UpdateTabControlMargin ( ) ;
64
65
}
@@ -134,6 +135,16 @@ public bool IsSidebarOpen
134
135
}
135
136
}
136
137
138
+ public bool AreSectionsHidden =>
139
+ ! ShowPinnedFoldersSection &&
140
+ ! ShowLibrarySection &&
141
+ ! ShowDrivesSection &&
142
+ ! ShowCloudDrivesSection &&
143
+ ! ShowNetworkSection &&
144
+ ( ! ShowWslSection || WSLDistroManager . Distros . Any ( ) == false ) &&
145
+ ! ShowFileTagsSection &&
146
+ SidebarDisplayMode is not SidebarDisplayMode . Compact ;
147
+
137
148
public bool ShowPinnedFoldersSection
138
149
{
139
150
get => UserSettingsService . GeneralSettingsService . ShowPinnedSection ;
@@ -635,30 +646,37 @@ private async void UserSettingsService_OnSettingChangedEvent(object sender, Sett
635
646
case nameof ( UserSettingsService . GeneralSettingsService . ShowPinnedSection ) :
636
647
await UpdateSectionVisibilityAsync ( SectionType . Pinned , ShowPinnedFoldersSection ) ;
637
648
OnPropertyChanged ( nameof ( ShowPinnedFoldersSection ) ) ;
649
+ OnPropertyChanged ( nameof ( AreSectionsHidden ) ) ;
638
650
break ;
639
651
case nameof ( UserSettingsService . GeneralSettingsService . ShowLibrarySection ) :
640
652
await UpdateSectionVisibilityAsync ( SectionType . Library , ShowLibrarySection ) ;
641
653
OnPropertyChanged ( nameof ( ShowLibrarySection ) ) ;
654
+ OnPropertyChanged ( nameof ( AreSectionsHidden ) ) ;
642
655
break ;
643
656
case nameof ( UserSettingsService . GeneralSettingsService . ShowCloudDrivesSection ) :
644
657
await UpdateSectionVisibilityAsync ( SectionType . CloudDrives , ShowCloudDrivesSection ) ;
645
658
OnPropertyChanged ( nameof ( ShowCloudDrivesSection ) ) ;
659
+ OnPropertyChanged ( nameof ( AreSectionsHidden ) ) ;
646
660
break ;
647
661
case nameof ( UserSettingsService . GeneralSettingsService . ShowDrivesSection ) :
648
662
await UpdateSectionVisibilityAsync ( SectionType . Drives , ShowDrivesSection ) ;
649
663
OnPropertyChanged ( nameof ( ShowDrivesSection ) ) ;
664
+ OnPropertyChanged ( nameof ( AreSectionsHidden ) ) ;
650
665
break ;
651
666
case nameof ( UserSettingsService . GeneralSettingsService . ShowNetworkSection ) :
652
667
await UpdateSectionVisibilityAsync ( SectionType . Network , ShowNetworkSection ) ;
653
668
OnPropertyChanged ( nameof ( ShowNetworkSection ) ) ;
669
+ OnPropertyChanged ( nameof ( AreSectionsHidden ) ) ;
654
670
break ;
655
671
case nameof ( UserSettingsService . GeneralSettingsService . ShowWslSection ) :
656
672
await UpdateSectionVisibilityAsync ( SectionType . WSL , ShowWslSection ) ;
657
673
OnPropertyChanged ( nameof ( ShowWslSection ) ) ;
674
+ OnPropertyChanged ( nameof ( AreSectionsHidden ) ) ;
658
675
break ;
659
676
case nameof ( UserSettingsService . GeneralSettingsService . ShowFileTagsSection ) :
660
677
await UpdateSectionVisibilityAsync ( SectionType . FileTag , ShowFileTagsSection ) ;
661
678
OnPropertyChanged ( nameof ( ShowFileTagsSection ) ) ;
679
+ OnPropertyChanged ( nameof ( AreSectionsHidden ) ) ;
662
680
break ;
663
681
}
664
682
}
0 commit comments