Remove minimize setting check on close event #1038
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This change was a simple one-liner, just removed minimizeToSystemTray setting check from condition in close event. It's explained below.
Motivation and Context
It fixes issues #763 and #1006. Both describes a problem that you can't close a window until minimize to system tray is enabled. Which then, as a setting suggests, you loose a minimize to taskbar function. Therefore, minimization setting should not interfere with closing.
With provided code change, window will close as it should, according to "runInBackground" setting it will stay in system tray or will quit. Minimize function will not interfere with this functionality. When "minimize to system tray" enabled, it will only affect the window minimize function with overriding it to minimize to system tray instead, otherwise minimize function will stay intact.
How Has This Been Tested?
It was tested on Windows 10 and honestly, there is not much test. Close will close window, minimize will minimize to taskbar or system tray, according to its setting. As described above.
Screenshots:
Fixed behavior
Types of changes
Checklist:
$ yarn lint
).