Skip to content

Commit 0a8963b

Browse files
committed
Remove Notification.Show & _mainViewModel.Show();
1 parent 4400734 commit 0a8963b

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

Flow.Launcher/App.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ public void Dispose()
343343

344344
public void OnSecondAppStarted()
345345
{
346-
Ioc.Default.GetRequiredService<MainViewModel>().Show();
346+
API.ShowMainWindow();
347347
}
348348

349349
#endregion

Flow.Launcher/Helper/HotKeyMapper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ internal static void SetCustomQueryHotkey(CustomPluginHotkey hotkey)
136136
if (_mainViewModel.ShouldIgnoreHotkeys())
137137
return;
138138

139-
_mainViewModel.Show();
139+
App.API.ShowMainWindow();
140140
_mainViewModel.ChangeQueryText(hotkey.ActionKeyword, true);
141141
});
142142
}

Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ public bool StartFlowLauncherOnSystemStartup
6060
}
6161
catch (Exception e)
6262
{
63-
Notification.Show(App.API.GetTranslation("setAutoStartFailed"),
64-
e.Message);
63+
App.API.ShowMsg(App.API.GetTranslation("setAutoStartFailed"), e.Message);
6564
}
6665
}
6766
}
@@ -88,8 +87,7 @@ public bool UseLogonTaskForStartup
8887
}
8988
catch (Exception e)
9089
{
91-
Notification.Show(App.API.GetTranslation("setAutoStartFailed"),
92-
e.Message);
90+
App.API.ShowMsg(App.API.GetTranslation("setAutoStartFailed"), e.Message);
9391
}
9492
}
9593
}

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
using Flow.Launcher.Core.Plugin;
1717
using Flow.Launcher.Infrastructure;
1818
using Flow.Launcher.Infrastructure.Hotkey;
19-
using Flow.Launcher.Infrastructure.Image;
2019
using Flow.Launcher.Infrastructure.Logger;
2120
using Flow.Launcher.Infrastructure.Storage;
2221
using Flow.Launcher.Infrastructure.UserSettings;
@@ -275,7 +274,7 @@ private async Task ReloadPluginDataAsync()
275274
Hide();
276275

277276
await PluginManager.ReloadDataAsync().ConfigureAwait(false);
278-
Notification.Show(App.API.GetTranslation("success"),
277+
App.API.ShowMsg(App.API.GetTranslation("success"),
279278
App.API.GetTranslation("completedSuccessfully"));
280279
}
281280

0 commit comments

Comments
 (0)