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.
Here's a suggested fix for issue #36.
Here are some design considerations around the manual showing:
On showing:
if NFX.started
- I check this value in the new method,showManually()
NFX.presented = true
- At this point Netfox will no longer control whether the window has already been presented, that is the job of the new presenter. If Netfox is asked to show usingshow()
, it will (and should) do so.On hiding:
if !NFX.presented
- Same as above, Netfox is no longer in charge if they usedshowManually()
NotificationCenter.default.post
- If the user wishes to deactivate the search window on disappearing, they are free to do so. The notification has been publicly exposed. I'd love to have more discussion as to why we (Netfox) even needs to do this. At first glance, it seems like we're having a memory leak. Once the window is shown and dismissed, whether the search controller is active shouldn't matter anymore, it should be deallocated.NFX.lastVisitDate
- I moved this logic intoNFXListController
'sViewWillDisappear
method. It makes a little more sense to do so, sinceNFXListController
is the only one that cares about it. I left the actual property in NFX, simply because another class might be interested in this value as well (in the future)