-
-
Notifications
You must be signed in to change notification settings - Fork 446
Force Exit & Fix HideonStartup (#783) #784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't we want to do something here like clear the query box? That code is within the toggleflowlauncher.
It's been more than 24 hours since I didn't sleep when I was working on that code. 😂
How about this? |
Flow.Launcher/MainWindow.xaml.cs
Outdated
setting.Click += (o, e) => App.API.OpenSettingDialog(); | ||
var exit = items.Add(InternationalizationManager.Instance.GetTranslation("iconTrayExit")); | ||
exit.Click += (o, e) => Close(); | ||
exit.Click += (o, e) => Environment.Exit(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this one, don't change. Calling Close() will allow saving normal process of saving setting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
memo : When executing 'open maintaining folder' on the file plug-in, the problem in which 'lastemptyquery' does not work is also fixed to this pr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@onesounds should this be Close() not environment.exit acording to @taooceros ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. If I use "environment.ext" here, the process ends immediately, so it don't have time to save settings. If I do as Taoo said, close() will call onclosing(), so it will exit after the save is completed. In short, it is right to use close() here.
This part is not related to this pr topic, just there is a problem that the process continues to remain, so I applied it.
Flow.Launcher/MainWindow.xaml.cs
Outdated
setting.Click += (o, e) => App.API.OpenSettingDialog(); | ||
var exit = items.Add(InternationalizationManager.Instance.GetTranslation("iconTrayExit")); | ||
exit.Click += (o, e) => Close(); | ||
exit.Click += (o, e) => Environment.Exit(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@onesounds should this be Close() not environment.exit acording to @taooceros ?
} | ||
|
||
public void Hide() | ||
public async void Hide() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why add async here? @onesounds / @taooceros
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for handling the task delay for fixing empty query issue.
Fix #783
There was no problem when I tested it, but I don't know if it'll be okay because I didn't understand the code exactly. Please check.