Skip to content

Commit 8a2ec4d

Browse files
Update Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 659356a commit 8a2ec4d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,14 @@ public bool PortableMode
149149

150150
public SearchDelaySpeedData SearchDelaySpeed
151151
{
152-
get => SearchDelaySpeeds.First(x => x.Value == Settings.SearchDelaySpeed);
152+
get => SearchDelaySpeeds.FirstOrDefault(x => x.Value == Settings.SearchDelaySpeed) ??
153+
SearchDelaySpeeds.FirstOrDefault(x => x.Value == SearchDelaySpeeds.Medium) ??
154+
SearchDelaySpeeds.FirstOrDefault();
153155
set
154156
{
157+
if (value == null)
158+
return;
159+
155160
if (Settings.SearchDelaySpeed != value.Value)
156161
{
157162
Settings.SearchDelaySpeed = value.Value;

0 commit comments

Comments
 (0)