File tree Expand file tree Collapse file tree 2 files changed +27
-4
lines changed
Flow.Launcher.Infrastructure Expand file tree Collapse file tree 2 files changed +27
-4
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,21 @@ public PinyinAlphabet()
25
25
26
26
_settings . PropertyChanged += ( sender , e ) =>
27
27
{
28
- if ( e . PropertyName == nameof ( Settings . UseDoublePinyin ) ||
29
- e . PropertyName == nameof ( Settings . DoublePinyinSchema ) )
28
+ switch ( e . PropertyName )
30
29
{
31
- Reload ( ) ;
30
+ case nameof ( Settings . ShouldUsePinyin ) :
31
+ if ( _settings . ShouldUsePinyin )
32
+ {
33
+ Reload ( ) ;
34
+ }
35
+ break ;
36
+ case nameof ( Settings . UseDoublePinyin ) :
37
+ case nameof ( Settings . DoublePinyinSchema ) :
38
+ if ( _settings . UseDoublePinyin )
39
+ {
40
+ Reload ( ) ;
41
+ }
42
+ break ;
32
43
}
33
44
} ;
34
45
}
Original file line number Diff line number Diff line change @@ -328,7 +328,19 @@ public CustomBrowserViewModel CustomBrowser
328
328
/// <summary>
329
329
/// when false Alphabet static service will always return empty results
330
330
/// </summary>
331
- public bool ShouldUsePinyin { get ; set ; } = false ;
331
+ private bool _useAlphabet = true ;
332
+ public bool ShouldUsePinyin
333
+ {
334
+ get => _useAlphabet ;
335
+ set
336
+ {
337
+ if ( _useAlphabet != value )
338
+ {
339
+ _useAlphabet = value ;
340
+ OnPropertyChanged ( ) ;
341
+ }
342
+ }
343
+ }
332
344
333
345
private bool _useDoublePinyin = false ;
334
346
public bool UseDoublePinyin
You can’t perform that action at this time.
0 commit comments