From e720e4facd574224723966b1ada2da11db08b162 Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Wed, 7 Dec 2022 13:58:20 +0800 Subject: [PATCH] mark modified in setters --- .../ViewModels/AddProgramSourceViewModel.cs | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/ViewModels/AddProgramSourceViewModel.cs b/Plugins/Flow.Launcher.Plugin.Program/ViewModels/AddProgramSourceViewModel.cs index 4d653ddb2..b7d1bddbb 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/ViewModels/AddProgramSourceViewModel.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/ViewModels/AddProgramSourceViewModel.cs @@ -18,7 +18,7 @@ namespace Flow.Launcher.Plugin.Program.ViewModels set { enabled = value; - OnPropertyChanged(nameof(Enabled)); + StatusModified = true; } } @@ -29,7 +29,7 @@ namespace Flow.Launcher.Plugin.Program.ViewModels set { location = value; - OnPropertyChanged(nameof(Location)); + LocationModified = true; } } @@ -55,19 +55,6 @@ namespace Flow.Launcher.Plugin.Program.ViewModels location = Source.Location; AddBtnText = API.GetTranslation("flowlauncher_plugin_program_update"); IsCustomSource = Settings.ProgramSources.Any(x => x.UniqueIdentifier == Source.UniqueIdentifier); - - this.PropertyChanged += (_, args) => - { - switch (args.PropertyName) - { - case nameof(Location): - LocationModified = true; - break; - case nameof(Enabled): - StatusModified = true; - break; - } - }; } public void Browse()