Skip to content

Commit 3618996

Browse files
committed
Fix: Fixed issue where drive capacity was visible for Cloud Drives
1 parent f6f590a commit 3618996

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Files.App/Data/Models/SelectedItemsPropertiesViewModel.cs

-1
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,6 @@ public string DriveCapacity
437437
get => driveCapacity;
438438
set
439439
{
440-
DriveCapacityVisibility = true;
441440
SetProperty(ref driveCapacity, value);
442441
}
443442
}

src/Files.App/ViewModels/Properties/BasePropertiesPage.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ protected override void OnNavigatedTo(NavigationEventArgs e)
3939
var props = new DriveProperties(ViewModel, drive, AppInstance);
4040
BaseProperties = props;
4141

42-
ViewModel.FormatVisibility = !(props.Drive.Type == DriveType.Network || string.Equals(props.Drive.Path, "C:\\", StringComparison.OrdinalIgnoreCase));
42+
ViewModel.FormatVisibility = !(props.Drive.Type == DriveType.Network
43+
|| props.Drive.Type == DriveType.CloudDrive
44+
|| string.Equals(props.Drive.Path, "C:\\", StringComparison.OrdinalIgnoreCase));
45+
ViewModel.DriveCapacityVisibility = !(props.Drive.Type == DriveType.Network || props.Drive.Type == DriveType.CloudDrive);
4346
ViewModel.CleanupDriveCommand = new AsyncRelayCommand(() => StorageSenseHelper.OpenStorageSenseAsync(props.Drive.Path));
4447
ViewModel.FormatDriveCommand = new RelayCommand(async () =>
4548
{

0 commit comments

Comments
 (0)