Skip to content

Commit 8bc497a

Browse files
committed
fix naming
1 parent 4d5d6c2 commit 8bc497a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,12 +1436,12 @@ await PluginManager.QueryHomeForPluginAsync(plugin, query, token) :
14361436
App.API.LogDebug(ClassName, $"Update results for plugin <{plugin.Metadata.Name}>");
14371437

14381438
// Indicate if to clear existing results so to show only ones from plugins with action keywords
1439-
var clearExistingResultsRequired = RequireClearExistingResults(query, currentIsHomeQuery);
1439+
var shouldClearExistingResults = ShouldClearExistingResults(query, currentIsHomeQuery);
14401440
_lastQuery = query;
14411441
_previousIsHomeQuery = currentIsHomeQuery;
14421442

14431443
if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(resultsCopy, plugin.Metadata, query,
1444-
token, reSelect, clearExistingResultsRequired)))
1444+
token, reSelect, shouldClearExistingResults)))
14451445
{
14461446
App.API.LogError(ClassName, "Unable to add item to Result Update Queue");
14471447
}
@@ -1556,7 +1556,7 @@ private async Task BuildQueryAsync(IEnumerable<BaseBuiltinShortcutModel> builtIn
15561556
/// <param name="query">The current query.</param>
15571557
/// <param name="currentIsHomeQuery">A flag indicating if the current query is a home query.</param>
15581558
/// <returns>True if the existing results should be cleared, false otherwise.</returns>
1559-
private bool RequireClearExistingResults(Query query, bool currentIsHomeQuery)
1559+
private bool ShouldClearExistingResults(Query query, bool currentIsHomeQuery)
15601560
{
15611561
// If previous or current results are from home query, we need to clear them
15621562
if (_previousIsHomeQuery || currentIsHomeQuery)

Flow.Launcher/ViewModel/ResultsForUpdate.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public record struct ResultsForUpdate(
1010
Query Query,
1111
CancellationToken Token,
1212
bool ReSelectFirstResult = true,
13-
bool requireClearExistingResults = false)
13+
bool shouldClearExistingResults = false)
1414
{
1515
public string ID { get; } = Metadata.ID;
1616
}

Flow.Launcher/ViewModel/ResultsViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ private List<ResultViewModel> NewResults(ICollection<ResultsForUpdate> resultsFo
234234

235235
var newResults = resultsForUpdates.SelectMany(u => u.Results, (u, r) => new ResultViewModel(r, _settings));
236236

237-
if (resultsForUpdates.Any(x => x.requireClearExistingResults))
237+
if (resultsForUpdates.Any(x => x.shouldClearExistingResults))
238238
return newResults.OrderByDescending(rv => rv.Result.Score).ToList();
239239

240240
return Results.Where(r => r?.Result != null && resultsForUpdates.All(u => u.ID != r.Result.PluginID))

0 commit comments

Comments
 (0)