Skip to content

Commit

Permalink
Naming & Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrariofilippo committed Nov 24, 2024
1 parent db75b2e commit 4926a33
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Files.App/Data/Enums/PreviewPaneStates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ public enum PreviewPaneStates
/// <summary>
/// Drive preview and details available status.
/// </summary>
DrivePreviewAndDetailsAvailable,
DriveStorageDetailsAvailable,
}
}
4 changes: 2 additions & 2 deletions src/Files.App/UserControls/Pane/InfoPane.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@
</Grid.ColumnDefinitions>

<TextBlock
x:Name="AvailableSpaceTextBox"

This comment has been minimized.

Copy link
@yaira2

yaira2 Nov 25, 2024

Member

Can you update the names of the other text blocks?

x:Name="AvailableSpaceTextBlock"
FontFamily="{ThemeResource ContentControlThemeFontFamily}"
FontSize="14"
FontWeight="Bold"
Expand Down Expand Up @@ -573,7 +573,7 @@
<Setter Target="PreviewLoadingIndicator.Visibility" Value="Visible" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="DrivePreviewAndDetailsAvailable">
<VisualState x:Name="DriveStorageDetailsAvailable">
<VisualState.StateTriggers>
<triggers:IsEqualStateTrigger Value="{x:Bind ViewModel.PreviewPaneState, Mode=OneWay}" To="5" />
</VisualState.StateTriggers>
Expand Down
4 changes: 2 additions & 2 deletions src/Files.App/ViewModels/UserControls/InfoPaneViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ private async Task LoadPreviewControlAsync(CancellationToken token, bool downloa
if (control is not null)
{
PreviewPaneContent = control;
PreviewPaneState = SelectedItem.IsDriveRoot ? PreviewPaneStates.DrivePreviewAndDetailsAvailable : PreviewPaneStates.PreviewAndDetailsAvailable;
PreviewPaneState = SelectedItem.IsDriveRoot ? PreviewPaneStates.DriveStorageDetailsAvailable : PreviewPaneStates.PreviewAndDetailsAvailable;
return;
}

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

PreviewPaneContent = control;
PreviewPaneState = SelectedItem.IsDriveRoot ? PreviewPaneStates.DrivePreviewAndDetailsAvailable : PreviewPaneStates.PreviewAndDetailsAvailable;
PreviewPaneState = SelectedItem.IsDriveRoot ? PreviewPaneStates.DriveStorageDetailsAvailable : PreviewPaneStates.PreviewAndDetailsAvailable;
}

private async Task<UserControl> GetBuiltInPreviewControlAsync(ListedItem item, bool downloadItem)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ private async Task LoadPreviewAndDetailsAsync()
if (result is not null)
Thumbnail = await result.ToBitmapAsync();

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

Expand Down

0 comments on commit 4926a33

Please sign in to comment.