diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs index edfa5bb99..a34608454 100644 --- a/Flow.Launcher.Plugin/Result.cs +++ b/Flow.Launcher.Plugin/Result.cs @@ -23,7 +23,7 @@ namespace Flow.Launcher.Plugin private string _icoPath; - private string _icoAbsoluteFullPath; + private string _icoPathAbsolute; private string _copyText = string.Empty; @@ -72,9 +72,7 @@ namespace Flow.Launcher.Plugin /// /// Can be a local file path or a URL. /// - /// GlyphInfo is prioritized if not null. - /// Use IcoPathRelative for storage where it needs to be resistant to plugin location change. - /// + /// GlyphInfo is prioritized if not null public string IcoPath { get => _icoPath; @@ -90,11 +88,11 @@ namespace Flow.Launcher.Plugin && !value.StartsWith("https://", StringComparison.OrdinalIgnoreCase) && !value.StartsWith("data:image", StringComparison.OrdinalIgnoreCase)) { - _icoAbsoluteFullPath = Path.Combine(PluginDirectory, value); + _icoPathAbsolute = Path.Combine(PluginDirectory, value); } else { - _icoAbsoluteFullPath = value; + _icoPathAbsolute = value; } } } @@ -102,7 +100,7 @@ namespace Flow.Launcher.Plugin /// /// TODO COMMENT /// - public string IcoAbsoluteFullPath => _icoAbsoluteFullPath; + public string IcoPathAbsolute => _icoPathAbsolute; /// /// The image to be displayed for the badge of the result. diff --git a/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml b/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml index 5d8837891..4d37dc93a 100644 --- a/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml +++ b/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml @@ -333,7 +333,7 @@ Margin="18 24 0 0" HorizontalAlignment="Left" RenderOptions.BitmapScalingMode="Fant" - Source="{Binding IcoAbsoluteFullPath, IsAsync=True}" /> + Source="{Binding IcoPathAbsolute, IsAsync=True}" /> - public void UpdateIcoAbsoluteFullPath() + public void UpdateIcoPathAbsolute() { if (LastOpenedHistoryItems.Count == 0) return; diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index c3c9d8fc8..650c0a34c 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -1370,7 +1370,7 @@ namespace Flow.Launcher.ViewModel internal void RefreshLastOpenedHistoryResult() { _history.PopulateHistoryFromLegacyHistory(); - _history.UpdateIcoAbsoluteFullPath(); + _history.UpdateIcoPathAbsolute(); } private async Task QueryResultsAsync(bool searchDelay, bool isReQuery = false, bool reSelect = true) diff --git a/Flow.Launcher/ViewModel/ResultViewModel.cs b/Flow.Launcher/ViewModel/ResultViewModel.cs index 974b2e83b..077acfce7 100644 --- a/Flow.Launcher/ViewModel/ResultViewModel.cs +++ b/Flow.Launcher/ViewModel/ResultViewModel.cs @@ -141,7 +141,7 @@ namespace Flow.Launcher.ViewModel 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; @@ -236,7 +236,7 @@ namespace Flow.Launcher.ViewModel private async Task LoadImageAsync() { - var imagePath = Result.IcoAbsoluteFullPath; + var imagePath = Result.IcoPathAbsolute; var iconDelegate = Result.Icon; if (ImageLoader.TryGetValue(imagePath, false, out var img)) { @@ -266,7 +266,7 @@ namespace Flow.Launcher.ViewModel 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; if (ImageLoader.TryGetValue(imagePath, true, out var img)) {