File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed
Plugins/Flow.Launcher.Plugin.WebSearch Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change 1
- using System . IO ;
1
+ using System . IO ;
2
2
using System . Windows . Media ;
3
3
using JetBrains . Annotations ;
4
4
using Newtonsoft . Json ;
@@ -16,11 +16,26 @@ public class SearchSource : BaseModel
16
16
public string Icon { get ; set ; } = DefaultIcon ;
17
17
18
18
/// <summary>
19
- /// All icon should be put under Images directory
19
+ /// Default icons are placed in Images directory in the app location.
20
+ /// Custom icons are placed in the user data directory
20
21
/// </summary>
21
22
[ NotNull ]
22
- [ JsonIgnore ]
23
- internal string IconPath => Path . Combine ( Main . ImagesDirectory , Icon ) ;
23
+ public string IconPath
24
+ {
25
+ get
26
+ {
27
+ if ( string . IsNullOrEmpty ( iconPath ) )
28
+ return Path . Combine ( Main . ImagesDirectory , Icon ) ;
29
+
30
+ return iconPath ;
31
+ }
32
+ set
33
+ {
34
+ iconPath = value ;
35
+ }
36
+ }
37
+
38
+ private string iconPath ;
24
39
25
40
[ JsonIgnore ]
26
41
public ImageSource Image => ImageLoader . Load ( IconPath ) ;
You can’t perform that action at this time.
0 commit comments