Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Flow.Launcher/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#region Public Properties

public static IPublicAPI API { get; private set; }
public static bool Exiting => _mainWindow.CanClose;
public static bool LoadingOrExiting => _mainWindow == null || _mainWindow.CanClose;

#endregion

Expand Down Expand Up @@ -114,9 +114,9 @@
// Initialize the public API and Settings first
try
{
API = Ioc.Default.GetRequiredService<IPublicAPI>();

Check warning on line 117 in Flow.Launcher/App.xaml.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`Ioc` is not a recognized word. (unrecognized-spelling)
_settings.Initialize();
_mainVM = Ioc.Default.GetRequiredService<MainViewModel>();

Check warning on line 119 in Flow.Launcher/App.xaml.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`Ioc` is not a recognized word. (unrecognized-spelling)
}
catch (Exception e)
{
Expand Down Expand Up @@ -171,7 +171,7 @@
Current.Resources["SettingWindowFont"] = new FontFamily(_settings.SettingWindowFont);
Current.Resources["ContentControlThemeFontFamily"] = new FontFamily(_settings.SettingWindowFont);

Ioc.Default.GetRequiredService<Portable>().PreStartCleanUpAfterPortabilityUpdate();

Check warning on line 174 in Flow.Launcher/App.xaml.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`Ioc` is not a recognized word. (unrecognized-spelling)

API.LogInfo(ClassName, "Begin Flow Launcher startup ----------------------------------------------------");
API.LogInfo(ClassName, $"Runtime info:{ErrorReporting.RuntimeInfo()}");
Expand All @@ -187,7 +187,7 @@
PluginManager.LoadPlugins(_settings.PluginSettings);

// Register ResultsUpdated event after all plugins are loaded
Ioc.Default.GetRequiredService<MainViewModel>().RegisterResultsUpdatedEvent();

Check warning on line 190 in Flow.Launcher/App.xaml.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`Ioc` is not a recognized word. (unrecognized-spelling)

Http.Proxy = _settings.Proxy;

Expand All @@ -196,7 +196,7 @@
// Change language after all plugins are initialized because we need to update plugin title based on their api
await Ioc.Default.GetRequiredService<Internationalization>().InitializeLanguageAsync();

await imageLoadertask;

Check warning on line 199 in Flow.Launcher/App.xaml.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`Loadertask` is not a recognized word. (unrecognized-spelling)

_mainWindow = new MainWindow();

Expand All @@ -222,7 +222,7 @@
});
}

#pragma warning restore VSTHRD100 // Avoid async void methods

Check warning on line 225 in Flow.Launcher/App.xaml.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`VSTHRD` is not a recognized word. (unrecognized-spelling)

/// <summary>
/// Check startup only for Release
Expand Down
2 changes: 1 addition & 1 deletion Flow.Launcher/SettingWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private void OnClosed(object sender, EventArgs e)
_viewModel.PropertyChanged -= ViewModel_PropertyChanged;

// If app is exiting, settings save is not needed because main window closing event will handle this
if (App.Exiting) return;
if (App.LoadingOrExiting) return;
// Save settings when window is closed
_settings.Save();
App.API.SavePluginSettings();
Expand Down
2 changes: 1 addition & 1 deletion Flow.Launcher/ViewModel/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1724,12 +1724,12 @@

#region Public Methods

#pragma warning disable VSTHRD100 // Avoid async void methods

Check warning on line 1727 in Flow.Launcher/ViewModel/MainViewModel.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`VSTHRD` is not a recognized word. (unrecognized-spelling)

public void Show()
{
// When application is exiting, we should not show the main window
if (App.Exiting) return;
if (App.LoadingOrExiting) return;

// When application is exiting, the Application.Current will be null
Application.Current?.Dispatcher.Invoke(() =>
Expand Down Expand Up @@ -1842,7 +1842,7 @@
VisibilityChanged?.Invoke(this, new VisibilityChangedEventArgs { IsVisible = false });
}

#pragma warning restore VSTHRD100 // Avoid async void methods

Check warning on line 1845 in Flow.Launcher/ViewModel/MainViewModel.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`VSTHRD` is not a recognized word. (unrecognized-spelling)

/// <summary>
/// Save history, user selected records and top most records
Expand Down
2 changes: 1 addition & 1 deletion Flow.Launcher/WelcomeWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private void ContentFrame_Loaded(object sender, RoutedEventArgs e)
private void Window_Closed(object sender, EventArgs e)
{
// If app is exiting, settings save is not needed because main window closing event will handle this
if (App.Exiting) return;
if (App.LoadingOrExiting) return;
// Save settings when window is closed
_settings.Save();
}
Expand Down
Loading