diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml index 778f00160..f57c0e2d9 100644 --- a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml +++ b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml @@ -91,7 +91,8 @@ Maximum="1000" Minimum="0" SpinButtonPlacementMode="Inline" - ToolTip="{DynamicResource searchDelayToolTip}" /> + ToolTip="{DynamicResource searchDelayToolTip}" + Value="{Binding PluginSearchDelayTime, Mode=TwoWay}" /> diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs index 22a69592b..2dff72ac5 100644 --- a/Flow.Launcher/ViewModel/PluginViewModel.cs +++ b/Flow.Launcher/ViewModel/PluginViewModel.cs @@ -93,13 +93,23 @@ namespace Flow.Launcher.ViewModel } } - public int? PluginSearchDelayTime + public double PluginSearchDelayTime { - get => PluginPair.Metadata.SearchDelayTime; + get => PluginPair.Metadata.SearchDelayTime == null ? + double.NaN : + PluginPair.Metadata.SearchDelayTime.Value; set { - PluginPair.Metadata.SearchDelayTime = value; - PluginSettingsObject.SearchDelayTime = value; + if (double.IsNaN(value)) + { + PluginPair.Metadata.SearchDelayTime = null; + PluginSettingsObject.SearchDelayTime = null; + } + else + { + PluginPair.Metadata.SearchDelayTime = (int)value; + PluginSettingsObject.SearchDelayTime = (int)value; + } } }