Preserve POI type search text until attribute editor closes#953
Open
tordans wants to merge 1 commit into
Open
Conversation
Keep the feature picker search query in memory while the POI tab bar modal is open so returning from a mistaken selection does not clear it. Clear the stored query when the modal is dismissed (save, cancel, swipe, or equivalent). The search field clear control still resets the query via the existing text-change path. Co-Authored-By: Tobias <t@tobiasjordans.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
When choosing a feature type from search, returning to the tags screen after a mistaken pick previously left the type picker with an empty search field. The search query is now kept for the whole time the POI attribute editor (tab bar modal) stays open, and is cleared only when that modal is dismissed (save, cancel, interactive dismiss, etc.).
Implementation by Cursor
POIFeaturePickerViewController: store the current search string in a private static while the user edits; restore it inviewWillAppearand reuse a singlerefreshSearchResultshelper fromsearchBar(_:textDidChange:).POITabBarController: clear the stored string inviewWillDisappearwhen the controller is being dismissed or removed from its parent.The system search field clear control still clears the text through the existing delegate path.
Testing by me
Manually tested with Xcode Simulator:
gomap-search.min.mov