Skip to content

Commit

Permalink
Always forcefully exit when requested from the tray menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz committed Aug 23, 2024
1 parent 9b5ec39 commit 234e823
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions LightBulb/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,11 @@ private void DisableTemporarily5MinutesMenuItem_OnClick(object? sender, EventArg
private void DisableTemporarily1MinuteMenuItem_OnClick(object? sender, EventArgs args) =>
_mainViewModel.Dashboard.DisableTemporarilyCommand.Execute(TimeSpan.FromMinutes(1));

private void ExitMenuItem_OnClick(object? sender, EventArgs args) =>
ApplicationLifetime?.TryShutdown();
private void ExitMenuItem_OnClick(object? sender, EventArgs args)
{
if (ApplicationLifetime?.TryShutdown() != true)
Environment.Exit(0);
}

public void Dispose()
{
Expand Down

0 comments on commit 234e823

Please sign in to comment.