Skip to content

Conversation

onesounds
Copy link
Contributor

@onesounds onesounds commented Oct 31, 2021

Fix #783

  1. There is no problem with 'Hide on startup' and config
  2. It related Fix empty query #749
  3. The Hide() function uses the toggleFlowLauncher function. (Copied from PT)
  4. Hide() run when start of the flow in somewhere. Since this function was wearing a toggle, it was a problem that the hidden state was toggled again at the beginning.
  5. Power Toy seems to have had something different because it doesn't have Startup Setting.
  6. I changed Hide() to just close window.

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.

Copy link
Member

@taooceros taooceros left a 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.

@onesounds
Copy link
Contributor Author

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. 😂

  1. Move the 'Emptyquery' from Toggle to the Hide
  2. Toggle Using Hide when close window.

How about this?

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);
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. fixed.

Copy link
Contributor Author

@onesounds onesounds Nov 1, 2021

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.

Copy link
Member

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 ?

Copy link
Contributor Author

@onesounds onesounds Nov 6, 2021

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.

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);
Copy link
Member

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()
Copy link
Member

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

Copy link
Member

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.

@onesounds onesounds changed the title Fix HideonStartup (#783) Force Exit & Fix HideonStartup (#783) Nov 8, 2021
@onesounds onesounds merged commit ad5f34f into Flow-Launcher:dev Nov 8, 2021
@jjw24 jjw24 added the bug Something isn't working label Nov 8, 2021
@jjw24 jjw24 added this to the 1.9.0 milestone Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

"Hide Flow Launcher on startup" doesn't work in prerelease [1.9.0]

3 participants