Skip to content

Commit 4926a33

Browse files
Naming & Comments
1 parent db75b2e commit 4926a33

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

src/Files.App/Data/Enums/PreviewPaneStates.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ public enum PreviewPaneStates
3636
/// <summary>
3737
/// Drive preview and details available status.
3838
/// </summary>
39-
DrivePreviewAndDetailsAvailable,
39+
DriveStorageDetailsAvailable,
4040
}
4141
}

src/Files.App/UserControls/Pane/InfoPane.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@
302302
</Grid.ColumnDefinitions>
303303

304304
<TextBlock
305-
x:Name="AvailableSpaceTextBox"
305+
x:Name="AvailableSpaceTextBlock"
306306
FontFamily="{ThemeResource ContentControlThemeFontFamily}"
307307
FontSize="14"
308308
FontWeight="Bold"
@@ -573,7 +573,7 @@
573573
<Setter Target="PreviewLoadingIndicator.Visibility" Value="Visible" />
574574
</VisualState.Setters>
575575
</VisualState>
576-
<VisualState x:Name="DrivePreviewAndDetailsAvailable">
576+
<VisualState x:Name="DriveStorageDetailsAvailable">
577577
<VisualState.StateTriggers>
578578
<triggers:IsEqualStateTrigger Value="{x:Bind ViewModel.PreviewPaneState, Mode=OneWay}" To="5" />
579579
</VisualState.StateTriggers>

src/Files.App/ViewModels/UserControls/InfoPaneViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ private async Task LoadPreviewControlAsync(CancellationToken token, bool downloa
191191
if (control is not null)
192192
{
193193
PreviewPaneContent = control;
194-
PreviewPaneState = SelectedItem.IsDriveRoot ? PreviewPaneStates.DrivePreviewAndDetailsAvailable : PreviewPaneStates.PreviewAndDetailsAvailable;
194+
PreviewPaneState = SelectedItem.IsDriveRoot ? PreviewPaneStates.DriveStorageDetailsAvailable : PreviewPaneStates.PreviewAndDetailsAvailable;
195195
return;
196196
}
197197

@@ -204,7 +204,7 @@ private async Task LoadPreviewControlAsync(CancellationToken token, bool downloa
204204
return;
205205

206206
PreviewPaneContent = control;
207-
PreviewPaneState = SelectedItem.IsDriveRoot ? PreviewPaneStates.DrivePreviewAndDetailsAvailable : PreviewPaneStates.PreviewAndDetailsAvailable;
207+
PreviewPaneState = SelectedItem.IsDriveRoot ? PreviewPaneStates.DriveStorageDetailsAvailable : PreviewPaneStates.PreviewAndDetailsAvailable;
208208
}
209209

210210
private async Task<UserControl> GetBuiltInPreviewControlAsync(ListedItem item, bool downloadItem)

src/Files.App/ViewModels/UserControls/Previews/FolderPreviewViewModel.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ private async Task LoadPreviewAndDetailsAsync()
3636
if (result is not null)
3737
Thumbnail = await result.ToBitmapAsync();
3838

39+
// If the selected item is the root of a drive (e.g. "C:\")
40+
// we do not need to load the properties below, since they will not be shown.
41+
// Drive properties will be obtained through the DrivesViewModel service.
3942
if (Item.IsDriveRoot)
4043
return;
4144

0 commit comments

Comments
 (0)