File tree Expand file tree Collapse file tree 4 files changed +6
-9
lines changed Expand file tree Collapse file tree 4 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -402,7 +402,7 @@ public void UpdateContainsFilesFolders()
402
402
private bool CheckElevationRights ( )
403
403
{
404
404
// Avoid downloading file to check elevation
405
- if ( SyncStatusUI . SyncStatus == CloudDriveSyncStatus . FileOnline )
405
+ if ( SyncStatusUI . SyncStatus is CloudDriveSyncStatus . FileOnline or CloudDriveSyncStatus . FolderOnline )
406
406
return false ;
407
407
408
408
return IsShortcut
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ private void ToggleIsEnabled(string? algorithm)
69
69
}
70
70
71
71
// Don't calculate hashes for online files
72
- if ( _item . SyncStatusUI . SyncStatus == CloudDriveSyncStatus . FileOnline )
72
+ if ( _item . SyncStatusUI . SyncStatus is CloudDriveSyncStatus . FileOnline or CloudDriveSyncStatus . FolderOnline )
73
73
{
74
74
hashInfoItem . HashValue = "CalculationOnlineFileHashError" . GetLocalizedResource ( ) ;
75
75
return ;
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ public override async Task GetSpecialPropertiesAsync()
99
99
ViewModel . ItemSize = Item . FileSizeBytes . ToLongSizeString ( ) ;
100
100
101
101
// Only load the size for items on the device
102
- if ( Item . SyncStatusUI . SyncStatus != CloudDriveSyncStatus . FileOnline )
102
+ if ( Item . SyncStatusUI . SyncStatus is not CloudDriveSyncStatus . FileOnline and not CloudDriveSyncStatus . FolderOnline )
103
103
ViewModel . ItemSizeOnDisk = NativeFileOperationsHelper . GetFileSizeOnDisk ( Item . ItemPath ) ? . ToLongSizeString ( ) ??
104
104
string . Empty ;
105
105
Original file line number Diff line number Diff line change @@ -88,12 +88,9 @@ public async override Task GetSpecialPropertiesAsync()
88
88
ViewModel . ItemSize = Item . FileSizeBytes . ToLongSizeString ( ) ;
89
89
90
90
// Only load the size for items on the device
91
- if ( Item . SyncStatusUI . SyncStatus != CloudDriveSyncStatus . FileOnline )
92
- {
93
- var sizeOnDisk = NativeFileOperationsHelper . GetFileSizeOnDisk ( Item . ItemPath ) ;
94
- if ( sizeOnDisk is not null )
95
- ViewModel . ItemSizeOnDisk = ( ( long ) sizeOnDisk ) . ToLongSizeString ( ) ;
96
- }
91
+ if ( Item . SyncStatusUI . SyncStatus is not CloudDriveSyncStatus . FileOnline and not CloudDriveSyncStatus . FolderOnline )
92
+ ViewModel . ItemSizeOnDisk = NativeFileOperationsHelper . GetFileSizeOnDisk ( Item . ItemPath ) ? . ToLongSizeString ( ) ??
93
+ string . Empty ;
97
94
98
95
ViewModel . ItemCreatedTimestampReal = Item . ItemDateCreatedReal ;
99
96
ViewModel . ItemAccessedTimestampReal = Item . ItemDateAccessedReal ;
You can’t perform that action at this time.
0 commit comments