@@ -91,7 +91,7 @@ public Visibility ShowPreviewImage
91
91
{
92
92
if ( PreviewImageAvailable )
93
93
return Visibility . Visible ;
94
-
94
+
95
95
// Fall back to icon
96
96
return ShowIcon ;
97
97
}
@@ -103,7 +103,7 @@ public double IconRadius
103
103
{
104
104
if ( Result . RoundedIcon )
105
105
return IconXY / 2 ;
106
-
106
+
107
107
return IconXY ;
108
108
}
109
109
}
@@ -121,32 +121,12 @@ public Visibility ShowGlyph
121
121
}
122
122
}
123
123
124
- public Visibility ShowBadge
125
- {
126
- get
127
- {
128
- // If results do not allow badges, or user has disabled badges in settings,
129
- // or badge icon is not available, then do not show badge
130
- if ( ! Result . ShowBadge || ! Settings . ShowBadges || ! BadgeIconAvailable )
131
- return Visibility . Collapsed ;
132
-
133
- // If user has set to show badges only for global results, and this is not a global result,
134
- // then do not show badge
135
- if ( Settings . ShowBadgesGlobalOnly && ! IsGlobalQuery )
136
- return Visibility . Collapsed ;
137
-
138
- return Visibility . Visible ;
139
- }
140
- }
141
-
142
124
public bool IsGlobalQuery => string . IsNullOrEmpty ( Result . OriginQuery . ActionKeyword ) ;
143
125
144
126
private bool GlyphAvailable => Glyph is not null ;
145
127
146
128
private bool ImgIconAvailable => ! string . IsNullOrEmpty ( Result . IcoPath ) || Result . Icon is not null ;
147
129
148
- private bool BadgeIconAvailable => ! string . IsNullOrEmpty ( Result . BadgeIcoPath ) || Result . BadgeIcon is not null ;
149
-
150
130
private bool PreviewImageAvailable => ! string . IsNullOrEmpty ( Result . Preview . PreviewImagePath ) || Result . Preview . PreviewDelegate != null ;
151
131
152
132
public string ShowTitleToolTip => string . IsNullOrEmpty ( Result . TitleToolTip )
@@ -158,11 +138,9 @@ public Visibility ShowBadge
158
138
: Result . SubTitleToolTip ;
159
139
160
140
private volatile bool _imageLoaded ;
161
- private volatile bool _badgeImageLoaded ;
162
141
private volatile bool _previewImageLoaded ;
163
142
164
143
private ImageSource _image = ImageLoader . LoadingImage ;
165
- private ImageSource _badgeImage = ImageLoader . LoadingImage ;
166
144
private ImageSource _previewImage = ImageLoader . LoadingImage ;
167
145
168
146
public ImageSource Image
@@ -180,21 +158,6 @@ public ImageSource Image
180
158
private set => _image = value ;
181
159
}
182
160
183
- public ImageSource BadgeImage
184
- {
185
- get
186
- {
187
- if ( ! _badgeImageLoaded )
188
- {
189
- _badgeImageLoaded = true ;
190
- _ = LoadBadgeImageAsync ( ) ;
191
- }
192
-
193
- return _badgeImage ;
194
- }
195
- private set => _badgeImage = value ;
196
- }
197
-
198
161
public ImageSource PreviewImage
199
162
{
200
163
get
@@ -251,21 +214,6 @@ private async Task LoadImageAsync()
251
214
}
252
215
}
253
216
254
- private async Task LoadBadgeImageAsync ( )
255
- {
256
- var badgeImagePath = Result . BadgeIcoPath ;
257
- var badgeIconDelegate = Result . BadgeIcon ;
258
- if ( ImageLoader . TryGetValue ( badgeImagePath , false , out var img ) )
259
- {
260
- _badgeImage = img ;
261
- }
262
- else
263
- {
264
- // We need to modify the property not field here to trigger the OnPropertyChanged event
265
- BadgeImage = await LoadImageInternalAsync ( badgeImagePath , badgeIconDelegate , false ) . ConfigureAwait ( false ) ;
266
- }
267
- }
268
-
269
217
private async Task LoadPreviewImageAsync ( )
270
218
{
271
219
var imagePath = Result . Preview . PreviewImagePath ?? Result . IcoPath ;
0 commit comments