Change name to BadgeIcoPath

This commit is contained in:
Jack251970 2025-04-11 15:38:00 +08:00
parent b85c2f48f9
commit 9e3e0f6e3c
2 changed files with 8 additions and 8 deletions

View file

@ -23,7 +23,7 @@ namespace Flow.Launcher.Plugin
private string _copyText = string.Empty;
private string _badgePath;
private string _badgeIcoPath;
/// <summary>
/// The title of the result. This is always required.
@ -92,9 +92,9 @@ namespace Flow.Launcher.Plugin
/// </summary>
/// <value>Can be a local file path or a URL.</value>
/// <remarks>If null or empty, will use plugin icon</remarks>
public string BadgePath
public string BadgeIcoPath
{
get => _badgePath;
get => _badgeIcoPath;
set
{
// As a standard this property will handle prepping and converting to absolute local path for icon image processing
@ -105,11 +105,11 @@ namespace Flow.Launcher.Plugin
&& !value.StartsWith("https://", StringComparison.OrdinalIgnoreCase)
&& !value.StartsWith("data:image", StringComparison.OrdinalIgnoreCase))
{
_badgePath = Path.Combine(PluginDirectory, value);
_badgeIcoPath = Path.Combine(PluginDirectory, value);
}
else
{
_badgePath = value;
_badgeIcoPath = value;
}
}
}
@ -279,7 +279,7 @@ namespace Flow.Launcher.Plugin
CopyText = CopyText,
AutoCompleteText = AutoCompleteText,
IcoPath = IcoPath,
BadgePath = BadgePath,
BadgeIcoPath = BadgeIcoPath,
RoundedIcon = RoundedIcon,
Icon = Icon,
BadgeIcon = BadgeIcon,

View file

@ -1286,9 +1286,9 @@ namespace Flow.Launcher.ViewModel
foreach (var result in results)
{
if (string.IsNullOrEmpty(result.BadgePath))
if (string.IsNullOrEmpty(result.BadgeIcoPath))
{
result.BadgePath = plugin.Metadata.IcoPath;
result.BadgeIcoPath = plugin.Metadata.IcoPath;
}
}