Skip to content

Commit 5863f44

Browse files
authored
Fix: Fixed issue where there were multiple "home" items in the sidebar (#10141)
1 parent 5a6f97e commit 5863f44

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Files.App/ViewModels/SidebarViewModel.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,7 @@ public SidebarViewModel()
257257

258258
private async void CreateItemHome()
259259
{
260-
var home = await GetOrCreateSection(SectionType.Home);
261-
SideBarItems.Add(home);
260+
await CreateSection(SectionType.Home);
262261
}
263262

264263
private async void Manager_DataChanged(object sender, NotifyCollectionChangedEventArgs e)
@@ -446,7 +445,7 @@ private async Task<LocationItem> CreateSection(SectionType sectionType)
446445
}
447446
case SectionType.Network:
448447
{
449-
if (ShowNetworkDrivesSection)
448+
if (!ShowNetworkDrivesSection)
450449
{
451450
break;
452451
}
@@ -466,7 +465,7 @@ private async Task<LocationItem> CreateSection(SectionType sectionType)
466465
}
467466
case SectionType.FileTag:
468467
{
469-
if (ShowFileTagsSection)
468+
if (!ShowFileTagsSection)
470469
{
471470
break;
472471
}

0 commit comments

Comments
 (0)