Skip to content

Commit 1a7b523

Browse files
authored
Removed virtual drives from the drive widget (#2417)
1 parent 2cb38c9 commit 1a7b523

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Files/Filesystem/Drives.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPrio
9090
if (!MainPage.SideBarItems.Contains(drive))
9191
{
9292
MainPage.SideBarItems.Add(drive);
93-
DrivesWidget.ItemsAdded.Add(drive);
93+
94+
if (drive.Type != DriveType.VirtualDrive)
95+
{
96+
DrivesWidget.ItemsAdded.Add(drive);
97+
}
9498
}
9599
}
96100
foreach (INavigationControlItem item in MainPage.SideBarItems.ToList())
@@ -126,7 +130,11 @@ await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPrio
126130
if (!MainPage.SideBarItems.Contains(drive))
127131
{
128132
MainPage.SideBarItems.Add(drive);
129-
DrivesWidget.ItemsAdded.Add(drive);
133+
134+
if (drive.Type != DriveType.VirtualDrive)
135+
{
136+
DrivesWidget.ItemsAdded.Add(drive);
137+
}
130138
}
131139
}
132140
foreach (INavigationControlItem item in MainPage.SideBarItems.ToList())

Files/UserControls/Widgets/DrivesWidget.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<DataTemplate x:DataType="local2:DriveItem">
4141
<Grid
4242
Width="270"
43-
extensions:VisualExtensions.CenterPoint="80,45,0"
43+
extensions:VisualExtensions.CenterPoint="135,45,0"
4444
PointerEntered="GridScaleUp"
4545
PointerExited="GridScaleNormal">
4646
<animations:Implicit.Animations>

0 commit comments

Comments
 (0)