From b13ab3b893baefecdb788ab605e6e5d03bf504f3 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sun, 13 Apr 2025 17:27:17 +0800 Subject: [PATCH] Remove useless DI --- Flow.Launcher/SettingWindow.xaml.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index 28140f024..b4a3ae47a 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -6,7 +6,6 @@ using System.Windows.Interop; using CommunityToolkit.Mvvm.DependencyInjection; using Flow.Launcher.Infrastructure; using Flow.Launcher.Infrastructure.UserSettings; -using Flow.Launcher.Plugin; using Flow.Launcher.SettingPages.Views; using Flow.Launcher.ViewModel; using ModernWpf.Controls; @@ -16,7 +15,6 @@ namespace Flow.Launcher; public partial class SettingWindow { - private readonly IPublicAPI _api; private readonly Settings _settings; private readonly SettingWindowViewModel _viewModel; @@ -26,7 +24,6 @@ public partial class SettingWindow _settings = Ioc.Default.GetRequiredService(); DataContext = viewModel; _viewModel = viewModel; - _api = Ioc.Default.GetRequiredService(); InitializePosition(); InitializeComponent(); } @@ -49,7 +46,7 @@ public partial class SettingWindow _settings.SettingWindowTop = Top; _settings.SettingWindowLeft = Left; _viewModel.Save(); - _api.SavePluginSettings(); + App.API.SavePluginSettings(); } private void OnCloseExecuted(object sender, ExecutedRoutedEventArgs e)