mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
minor fixes and adjustments for code quality
This commit is contained in:
parent
ea7a2d271d
commit
19fa107fea
4 changed files with 8 additions and 7 deletions
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue