rename to IcoPathAbsolute

This commit is contained in:
Jeremy 2026-01-01 22:32:39 +11:00
parent 7c670de7c2
commit f9df44a2cd
5 changed files with 11 additions and 13 deletions

View file

@ -23,7 +23,7 @@ namespace Flow.Launcher.Plugin
private string _icoPath; private string _icoPath;
private string _icoAbsoluteFullPath; private string _icoPathAbsolute;
private string _copyText = string.Empty; private string _copyText = string.Empty;
@ -72,9 +72,7 @@ namespace Flow.Launcher.Plugin
/// </summary> /// </summary>
/// <value>Can be a local file path or a URL.</value> /// <value>Can be a local file path or a URL.</value>
/// <remarks> /// <remarks>
/// GlyphInfo is prioritized if not null. /// GlyphInfo is prioritized if not null</remarks>
/// Use IcoPathRelative for storage where it needs to be resistant to plugin location change.
/// </remarks>
public string IcoPath public string IcoPath
{ {
get => _icoPath; get => _icoPath;
@ -90,11 +88,11 @@ namespace Flow.Launcher.Plugin
&& !value.StartsWith("https://", StringComparison.OrdinalIgnoreCase) && !value.StartsWith("https://", StringComparison.OrdinalIgnoreCase)
&& !value.StartsWith("data:image", StringComparison.OrdinalIgnoreCase)) && !value.StartsWith("data:image", StringComparison.OrdinalIgnoreCase))
{ {
_icoAbsoluteFullPath = Path.Combine(PluginDirectory, value); _icoPathAbsolute = Path.Combine(PluginDirectory, value);
} }
else else
{ {
_icoAbsoluteFullPath = value; _icoPathAbsolute = value;
} }
} }
} }
@ -102,7 +100,7 @@ namespace Flow.Launcher.Plugin
/// <summary> /// <summary>
/// TODO COMMENT /// TODO COMMENT
/// </summary> /// </summary>
public string IcoAbsoluteFullPath => _icoAbsoluteFullPath; public string IcoPathAbsolute => _icoPathAbsolute;
/// <summary> /// <summary>
/// The image to be displayed for the badge of the result. /// The image to be displayed for the badge of the result.

View file

@ -333,7 +333,7 @@
Margin="18 24 0 0" Margin="18 24 0 0"
HorizontalAlignment="Left" HorizontalAlignment="Left"
RenderOptions.BitmapScalingMode="Fant" RenderOptions.BitmapScalingMode="Fant"
Source="{Binding IcoAbsoluteFullPath, IsAsync=True}" /> Source="{Binding IcoPathAbsolute, IsAsync=True}" />
<Border <Border
x:Name="LabelUpdate" x:Name="LabelUpdate"
Height="12" Height="12"

View file

@ -80,7 +80,7 @@ namespace Flow.Launcher.Storage
/// Refresh stored PluginDirectory (and optionally normalize relative ico paths) /// Refresh stored PluginDirectory (and optionally normalize relative ico paths)
/// using current plugin metadata. Call this after plugins are loaded/initialized. /// using current plugin metadata. Call this after plugins are loaded/initialized.
/// </summary> /// </summary>
public void UpdateIcoAbsoluteFullPath() public void UpdateIcoPathAbsolute()
{ {
if (LastOpenedHistoryItems.Count == 0) return; if (LastOpenedHistoryItems.Count == 0) return;

View file

@ -1370,7 +1370,7 @@ namespace Flow.Launcher.ViewModel
internal void RefreshLastOpenedHistoryResult() internal void RefreshLastOpenedHistoryResult()
{ {
_history.PopulateHistoryFromLegacyHistory(); _history.PopulateHistoryFromLegacyHistory();
_history.UpdateIcoAbsoluteFullPath(); _history.UpdateIcoPathAbsolute();
} }
private async Task QueryResultsAsync(bool searchDelay, bool isReQuery = false, bool reSelect = true) private async Task QueryResultsAsync(bool searchDelay, bool isReQuery = false, bool reSelect = true)

View file

@ -141,7 +141,7 @@ namespace Flow.Launcher.ViewModel
private bool GlyphAvailable => Glyph is not null; private bool GlyphAvailable => Glyph is not null;
private bool ImgIconAvailable => !string.IsNullOrEmpty(Result.IcoAbsoluteFullPath) || Result.Icon is not null; private bool ImgIconAvailable => !string.IsNullOrEmpty(Result.IcoPathAbsolute) || Result.Icon is not null;
private bool BadgeIconAvailable => !string.IsNullOrEmpty(Result.BadgeIcoPath) || Result.BadgeIcon is not null; private bool BadgeIconAvailable => !string.IsNullOrEmpty(Result.BadgeIcoPath) || Result.BadgeIcon is not null;
@ -236,7 +236,7 @@ namespace Flow.Launcher.ViewModel
private async Task LoadImageAsync() private async Task LoadImageAsync()
{ {
var imagePath = Result.IcoAbsoluteFullPath; var imagePath = Result.IcoPathAbsolute;
var iconDelegate = Result.Icon; var iconDelegate = Result.Icon;
if (ImageLoader.TryGetValue(imagePath, false, out var img)) if (ImageLoader.TryGetValue(imagePath, false, out var img))
{ {
@ -266,7 +266,7 @@ namespace Flow.Launcher.ViewModel
private async Task LoadPreviewImageAsync() private async Task LoadPreviewImageAsync()
{ {
var imagePath = Result.Preview.PreviewImagePath ?? Result.IcoAbsoluteFullPath; var imagePath = Result.Preview.PreviewImagePath ?? Result.IcoPathAbsolute;
var iconDelegate = Result.Preview.PreviewDelegate ?? Result.Icon; var iconDelegate = Result.Preview.PreviewDelegate ?? Result.Icon;
if (ImageLoader.TryGetValue(imagePath, true, out var img)) if (ImageLoader.TryGetValue(imagePath, true, out var img))
{ {