minor fixes and adjustments for code quality

This commit is contained in:
Jeremy 2026-01-04 22:05:39 +11:00
parent ea7a2d271d
commit 19fa107fea
4 changed files with 8 additions and 7 deletions

View file

@ -10,7 +10,7 @@ namespace Flow.Launcher.Plugin
{
/// <summary>
/// Describes a result of a <see cref="Query"/> executed by a plugin.
/// This or its child classses is serializable.
/// This or its child classes is serializable.
/// </summary>
public class Result
{

View file

@ -18,17 +18,15 @@ public class LastOpenedHistoryResult : Result
public string Query { get; set; } = string.Empty;
/// <summary>
/// The UTC date and time when this result was executed/opened.
/// The local date and time when this result was executed/opened.
/// </summary>
public DateTime ExecutedDateTime { get; set; }
/// <summary>
/// Initializes a new instance of <see cref="LastOpenedHistoryResult"/>.
/// Sets <see cref="OriginQuery"/> using the current <see cref="Query"/> value, because OriginQuery is not serialized.
/// </summary>
public LastOpenedHistoryResult()
{
this.OriginQuery = new Query { TrimmedQuery = Query };
}
/// <summary>

View file

@ -25,7 +25,7 @@ namespace Flow.Launcher.Storage
/// <see cref="LastOpenedHistoryResult"/> format and append them to
/// <see cref="LastOpenedHistoryItems"/>.
/// </summary>
[Obsolete("For backwards comaptibility. Remove after release v2.3.0")]
[Obsolete("For backwards compatibility. Remove after release v2.3.0")]
public void PopulateHistoryFromLegacyHistory()
{
if (Items.Count == 0) return;

View file

@ -356,8 +356,11 @@ namespace Flow.Launcher.ViewModel
{
SelectedResults = History;
SelectedResults.SelectedIndex = 0;
SelectedResults.SelectedItem = SelectedResults.Results[0];
if (SelectedResults.Results.Count > 0)
{
SelectedResults.SelectedIndex = 0;
SelectedResults.SelectedItem = SelectedResults.Results[0];
}
}
else
{