mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix search delay runtime change issue
This commit is contained in:
parent
2273d0cacf
commit
750cba2dde
2 changed files with 20 additions and 4 deletions
|
|
@ -330,7 +330,17 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
||||||
OnPropertyChanged();
|
OnPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public int SearchDelay { get; set; } = 120;
|
|
||||||
|
int searchDelay { get; set; } = 120;
|
||||||
|
public int SearchDelay
|
||||||
|
{
|
||||||
|
get => searchDelay;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
searchDelay = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public List<int> SearchDelayRange { get; } = new()
|
public List<int> SearchDelayRange { get; } = new()
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ namespace Flow.Launcher
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize search delay
|
// Initialize search delay
|
||||||
SetupSearchTextBoxReactiveness(_settings.SearchQueryResultsWithDelay);
|
SetupSearchTextBoxReactiveness(_settings.SearchQueryResultsWithDelay, _settings.SearchDelay);
|
||||||
|
|
||||||
// Initialize place holder
|
// Initialize place holder
|
||||||
SetupPlaceholderText();
|
SetupPlaceholderText();
|
||||||
|
|
@ -268,7 +268,13 @@ namespace Flow.Launcher
|
||||||
SetupResizeMode();
|
SetupResizeMode();
|
||||||
break;
|
break;
|
||||||
case nameof(Settings.SearchQueryResultsWithDelay):
|
case nameof(Settings.SearchQueryResultsWithDelay):
|
||||||
SetupSearchTextBoxReactiveness(_settings.SearchQueryResultsWithDelay);
|
SetupSearchTextBoxReactiveness(_settings.SearchQueryResultsWithDelay, _settings.SearchDelay);
|
||||||
|
break;
|
||||||
|
case nameof(Settings.SearchDelay):
|
||||||
|
if (_settings.SearchQueryResultsWithDelay)
|
||||||
|
{
|
||||||
|
SetupSearchTextBoxReactiveness(_settings.SearchQueryResultsWithDelay, _settings.SearchDelay);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -1122,7 +1128,7 @@ namespace Flow.Launcher
|
||||||
|
|
||||||
// Edited from: https://github.com/microsoft/PowerToys
|
// Edited from: https://github.com/microsoft/PowerToys
|
||||||
|
|
||||||
private void SetupSearchTextBoxReactiveness(bool showResultsWithDelay)
|
private void SetupSearchTextBoxReactiveness(bool showResultsWithDelay, int searchDelay)
|
||||||
{
|
{
|
||||||
if (_reactiveSubscription != null)
|
if (_reactiveSubscription != null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue