Skip to content

Commit b13ab3b

Browse files
committed
Remove useless DI
1 parent dde933a commit b13ab3b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Flow.Launcher/SettingWindow.xaml.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using CommunityToolkit.Mvvm.DependencyInjection;
77
using Flow.Launcher.Infrastructure;
88
using Flow.Launcher.Infrastructure.UserSettings;
9-
using Flow.Launcher.Plugin;
109
using Flow.Launcher.SettingPages.Views;
1110
using Flow.Launcher.ViewModel;
1211
using ModernWpf.Controls;
@@ -16,7 +15,6 @@ namespace Flow.Launcher;
1615

1716
public partial class SettingWindow
1817
{
19-
private readonly IPublicAPI _api;
2018
private readonly Settings _settings;
2119
private readonly SettingWindowViewModel _viewModel;
2220

@@ -26,7 +24,6 @@ public SettingWindow()
2624
_settings = Ioc.Default.GetRequiredService<Settings>();
2725
DataContext = viewModel;
2826
_viewModel = viewModel;
29-
_api = Ioc.Default.GetRequiredService<IPublicAPI>();
3027
InitializePosition();
3128
InitializeComponent();
3229
}
@@ -49,7 +46,7 @@ private void OnClosed(object sender, EventArgs e)
4946
_settings.SettingWindowTop = Top;
5047
_settings.SettingWindowLeft = Left;
5148
_viewModel.Save();
52-
_api.SavePluginSettings();
49+
App.API.SavePluginSettings();
5350
}
5451

5552
private void OnCloseExecuted(object sender, ExecutedRoutedEventArgs e)

0 commit comments

Comments
 (0)