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()
2525
2626 _settings . PropertyChanged += ( sender , e ) =>
2727 {
28- if ( e . PropertyName == nameof ( Settings . UseDoublePinyin ) ||
29- e . PropertyName == nameof ( Settings . DoublePinyinSchema ) )
28+ switch ( e . PropertyName )
3029 {
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 ;
3243 }
3344 } ;
3445 }
Original file line number Diff line number Diff line change @@ -328,7 +328,19 @@ public CustomBrowserViewModel CustomBrowser
328328 /// <summary>
329329 /// when false Alphabet static service will always return empty results
330330 /// </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+ }
332344
333345 private bool _useDoublePinyin = false ;
334346 public bool UseDoublePinyin
You can’t perform that action at this time.
0 commit comments