The HistoryStyle property is used to distinguish history items

This commit is contained in:
01Dri 2025-10-14 22:47:58 -03:00
parent 66fe0b8245
commit 0131b92c7a

View file

@ -1,4 +1,5 @@
using System;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
namespace Flow.Launcher.Storage;
@ -10,22 +11,7 @@ public class LastOpenedHistoryItem
public string PluginID { get; set; } = string.Empty;
public string Query { get; set; } = string.Empty;
public string RecordKey { get; set; } = string.Empty;
public HistoryStyle HistoryStyle { get; set; }
public DateTime ExecutedDateTime { get; set; }
public bool Equals(Result r)
{
if (string.IsNullOrEmpty(RecordKey) || string.IsNullOrEmpty(r.RecordKey))
{
return Title == r.Title
&& SubTitle == r.SubTitle
&& PluginID == r.PluginID
&& Query == r.OriginQuery.RawQuery;
}
else
{
return RecordKey == r.RecordKey
&& PluginID == r.PluginID
&& Query == r.OriginQuery.RawQuery;
}
}
}