From d429304a26c6bea99b4368a2e3778c12254fc266 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sat, 7 Jun 2025 13:54:15 +0800 Subject: [PATCH] Improve code quality --- Plugins/Flow.Launcher.Plugin.Explorer/Main.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs index cb2d29ec1..283820204 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs @@ -6,7 +6,6 @@ using Flow.Launcher.Plugin.Explorer.Views; using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Threading; using System.Threading.Tasks; using System.Windows.Controls; @@ -36,8 +35,8 @@ namespace Flow.Launcher.Plugin.Explorer Context = context; Settings = context.API.LoadSettingJsonStorage(); - FixLegacyQuickAccessLinkNames(); - + FillQuickAccessLinkNames(); + viewModel = new SettingsViewModel(context, Settings); contextMenu = new ContextMenu(Context, Settings, viewModel); @@ -98,8 +97,9 @@ namespace Flow.Launcher.Plugin.Explorer return Context.API.GetTranslation("plugin_explorer_plugin_description"); } - private void FixLegacyQuickAccessLinkNames() + private void FillQuickAccessLinkNames() { + // Legacy version does not have names for quick access links, so we fill them with the path name. foreach (var link in Settings.QuickAccessLinks) { if (string.IsNullOrWhiteSpace(link.Name))