@@ -31,7 +31,7 @@ public InstallPackageListItem(CatalogPackage package)
31
31
{
32
32
_package = package ;
33
33
34
- PackageVersionInfo version = _package . DefaultInstallVersion ;
34
+ var version = _package . DefaultInstallVersion ;
35
35
var versionTagText = "Unknown" ;
36
36
if ( version != null )
37
37
{
@@ -49,16 +49,24 @@ public InstallPackageListItem(CatalogPackage package)
49
49
50
50
private Details ? BuildDetails ( PackageVersionInfo ? version )
51
51
{
52
- CatalogPackageMetadata ? metadata = version ? . GetCatalogPackageMetadata ( ) ;
52
+ var metadata = version ? . GetCatalogPackageMetadata ( ) ;
53
53
if ( metadata != null )
54
54
{
55
+ if ( metadata . Tags . Where ( t => t . Equals ( WinGetExtensionPage . ExtensionsTag , StringComparison . OrdinalIgnoreCase ) ) . Any ( ) )
56
+ {
57
+ if ( _installCommand != null )
58
+ {
59
+ _installCommand . SkipDependencies = true ;
60
+ }
61
+ }
62
+
55
63
var description = string . IsNullOrEmpty ( metadata . Description ) ? metadata . ShortDescription : metadata . Description ;
56
64
var detailsBody = $ """
57
65
58
66
{ description }
59
67
""" ;
60
68
IconInfo heroIcon = new ( string . Empty ) ;
61
- IReadOnlyList < Icon > icons = metadata . Icons ;
69
+ var icons = metadata . Icons ;
62
70
if ( icons . Count > 0 )
63
71
{
64
72
// There's also a .Theme property we could probably use to
@@ -89,21 +97,23 @@ private List<IDetailsElement> GetDetailsMetadata(CatalogPackageMetadata metadata
89
97
{ Properties . Resources . winget_publisher , ( metadata . Publisher , metadata . PublisherUrl ) } ,
90
98
{ Properties . Resources . winget_copyright , ( metadata . Copyright , metadata . CopyrightUrl ) } ,
91
99
{ Properties . Resources . winget_license , ( metadata . License , metadata . LicenseUrl ) } ,
92
- { Properties . Resources . winget_release_notes , ( metadata . ReleaseNotes , string . Empty ) } ,
100
+ { Properties . Resources . winget_publisher_support , ( string . Empty , metadata . PublisherSupportUrl ) } ,
93
101
94
102
// The link to the release notes will only show up if there is an
95
103
// actual URL for the release notes
96
104
{ Properties . Resources . winget_view_release_notes , ( string . IsNullOrEmpty ( metadata . ReleaseNotesUrl ) ? string . Empty : Properties . Resources . winget_view_online , metadata . ReleaseNotesUrl ) } ,
97
- { Properties . Resources . winget_publisher_support , ( string . Empty , metadata . PublisherSupportUrl ) } ,
105
+
106
+ // These can be l o n g
107
+ { Properties . Resources . winget_release_notes , ( metadata . ReleaseNotes , string . Empty ) } ,
98
108
} ;
99
- Documentation [ ] docs = metadata . Documentations . ToArray ( ) ;
100
- foreach ( Documentation ? item in docs )
109
+ var docs = metadata . Documentations . ToArray ( ) ;
110
+ foreach ( var item in docs )
101
111
{
102
112
simpleData . Add ( item . DocumentLabel , ( string . Empty , item . DocumentUrl ) ) ;
103
113
}
104
114
105
115
UriCreationOptions options = default ;
106
- foreach ( KeyValuePair < string , ( string , string ) > kv in simpleData )
116
+ foreach ( var kv in simpleData )
107
117
{
108
118
var text = string . IsNullOrEmpty ( kv . Value . Item1 ) ? kv . Value . Item2 : kv . Value . Item1 ;
109
119
var target = kv . Value . Item2 ;
@@ -136,8 +146,8 @@ private List<IDetailsElement> GetDetailsMetadata(CatalogPackageMetadata metadata
136
146
137
147
private async void UpdatedInstalledStatus ( )
138
148
{
139
- CheckInstalledStatusResult status = await _package . CheckInstalledStatusAsync ( ) ;
140
- bool isInstalled = _package . InstalledVersion != null ;
149
+ var status = await _package . CheckInstalledStatusAsync ( ) ;
150
+ var isInstalled = _package . InstalledVersion != null ;
141
151
142
152
// might be an uninstall command
143
153
InstallPackageCommand installCommand = new ( _package , isInstalled ) ;
@@ -155,8 +165,8 @@ private async void UpdatedInstalledStatus()
155
165
156
166
if ( WinGetStatics . AppSearchCallback != null )
157
167
{
158
- Func < string , ICommandItem ? > callback = WinGetStatics . AppSearchCallback ;
159
- ICommandItem ? installedApp = callback ( _package . DefaultInstallVersion == null ? _package . Name : _package . DefaultInstallVersion . DisplayName ) ;
168
+ var callback = WinGetStatics . AppSearchCallback ;
169
+ var installedApp = callback ( _package . DefaultInstallVersion == null ? _package . Name : _package . DefaultInstallVersion . DisplayName ) ;
160
170
if ( installedApp != null )
161
171
{
162
172
this . Command = installedApp . Command ;
@@ -193,11 +203,11 @@ private void InstallStateChangedHandler(object? sender, InstallPackageCommand e)
193
203
Stopwatch s = new ( ) ;
194
204
Logger . LogDebug ( $ "Starting RefreshPackageCatalogAsync") ;
195
205
s . Start ( ) ;
196
- PackageCatalogReference [ ] refs = WinGetStatics . AvailableCatalogs . ToArray ( ) ;
206
+ var refs = WinGetStatics . AvailableCatalogs . ToArray ( ) ;
197
207
198
- foreach ( PackageCatalogReference ? catalog in refs )
208
+ foreach ( var catalog in refs )
199
209
{
200
- global :: Windows . Foundation . IAsyncOperationWithProgress < RefreshPackageCatalogResult , double > operation = catalog . RefreshPackageCatalogAsync ( ) ;
210
+ var operation = catalog . RefreshPackageCatalogAsync ( ) ;
201
211
operation . Wait ( ) ;
202
212
}
203
213
0 commit comments