Skip to content

Commit 0559145

Browse files
committed
refactor: replace IPublicApi instance calls with App.API
Ensures consistency with project architecture and avoids unnecessary direct usage of IPublicApi.
1 parent 52bb34f commit 0559145

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
2222
private readonly Updater _updater;
2323
private readonly Portable _portable;
2424
private readonly Internationalization _translater;
25-
private readonly IPublicAPI _publicAPIInstance;
2625
private readonly bool _initialIgnoreAccents;
27-
public SettingsPaneGeneralViewModel(Settings settings, Updater updater, Portable portable, Internationalization translater, IPublicAPI publicApiInstance)
26+
public SettingsPaneGeneralViewModel(Settings settings, Updater updater, Portable portable, Internationalization translater)
2827
{
2928
Settings = settings;
3029
_updater = updater;
3130
_portable = portable;
3231
_translater = translater;
33-
_publicAPIInstance = publicApiInstance;
3432
_initialIgnoreAccents = settings.IgnoreAccents;
3533
UpdateEnumDropdownLocalizations();
3634
}
@@ -370,7 +368,7 @@ private static string GetFileFromDialog(string title, string filter = "")
370368

371369
[RelayCommand]
372370
private void RestartApp()
373-
=> _publicAPIInstance.RestartApp();
371+
=> App.API.RestartApp();
374372
private void UpdateApp()
375373
{
376374
_ = _updater.UpdateAppAsync(false);

0 commit comments

Comments
 (0)