Skip to content

Commit b189595

Browse files
Add OnPropertyChanged() for double pinyin properties
1 parent 64a3aa5 commit b189595

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

Flow.Launcher.Infrastructure/UserSettings/Settings.cs

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,33 @@ public CustomBrowserViewModel CustomBrowser
290290
/// </summary>
291291
public bool ShouldUsePinyin { get; set; } = false;
292292

293-
public bool UseDoublePinyin { get; set; } = true; //For developing
293+
private bool _useDoublePinyin = true; // TODO: change default to false BEFORE RELEASE
294+
public bool UseDoublePinyin
295+
{
296+
get => _useDoublePinyin;
297+
set
298+
{
299+
if (_useDoublePinyin != value)
300+
{
301+
_useDoublePinyin = value;
302+
OnPropertyChanged();
303+
}
304+
}
305+
}
294306

295-
public string DoublePinyinSchema { get; set; } = "XiaoHe"; //For developing
307+
private string _doublePinyinSchema = "XiaoHe";
308+
public string DoublePinyinSchema
309+
{
310+
get => _doublePinyinSchema;
311+
set
312+
{
313+
if (_doublePinyinSchema != value)
314+
{
315+
_doublePinyinSchema = value;
316+
OnPropertyChanged();
317+
}
318+
}
319+
}
296320

297321
public bool AlwaysPreview { get; set; } = false;
298322

0 commit comments

Comments
 (0)