File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 2328
2328
<data name =" CalculationError" xml : space =" preserve" >
2329
2329
<value >An error occurred during the calculation</value >
2330
2330
</data >
2331
+ <data name =" CalculationOnlineFileHashError" xml : space =" preserve" >
2332
+ <value >Can't calculate hash for online file</value >
2333
+ </data >
2331
2334
<data name =" Algorithm" xml : space =" preserve" >
2332
2335
<value >Algorithm</value >
2333
2336
</data >
Original file line number Diff line number Diff line change 1
1
// Copyright (c) 2023 Files Community
2
2
// Licensed under the MIT License. See the LICENSE.
3
3
4
- using CommunityToolkit . Mvvm . ComponentModel ;
5
- using CommunityToolkit . Mvvm . DependencyInjection ;
6
- using CommunityToolkit . Mvvm . Input ;
7
- using CommunityToolkit . WinUI ;
8
- using Files . App . Extensions ;
9
- using Files . App . Utils ;
10
- using Files . Shared . Extensions ;
11
4
using Files . Shared . Helpers ;
12
- using System ;
13
- using System . Collections . Generic ;
14
- using System . Collections . ObjectModel ;
15
5
using System . IO ;
16
- using System . Linq ;
17
- using System . Threading ;
18
6
using System . Windows . Input ;
19
7
20
8
namespace Files . App . ViewModels . Properties
@@ -80,6 +68,13 @@ private void ToggleIsEnabled(string? algorithm)
80
68
UserSettingsService . GeneralSettingsService . ShowHashesDictionary = ShowHashes ;
81
69
}
82
70
71
+ // Don't calculate hashes for online files
72
+ if ( _item . SyncStatusUI . SyncStatus == CloudDriveSyncStatus . FileOnline )
73
+ {
74
+ hashInfoItem . HashValue = "CalculationOnlineFileHashError" . GetLocalizedResource ( ) ;
75
+ return ;
76
+ }
77
+
83
78
if ( hashInfoItem . HashValue is null && hashInfoItem . IsEnabled )
84
79
{
85
80
hashInfoItem . IsCalculating = true ;
You can’t perform that action at this time.
0 commit comments