Update view model when switching between entry and exit location #6224
+311
−82
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.
This PR contains two closely related issues:
The view location selection view must be able to work with both entry and exit locations. If a user has selected a single relay as an entry, the user should not be able to select the same relay as an exit, and vice versa. Edge cases around countries/cities containing a single relay don't have to be accounted for.
The user must be able to specify what locations should be used for the entry relay when multi-hop is enabled. The UI for this should follow the design from IOS-504.
The first time you enter the location view after enabling multi-hop, the user should be directed to the entry view so to onboard the user. Afterwards, entering the location view would direct the user to the exit view.
When showing the exit tab, the selected entry location should be marked as (Entry) and if it's a relay it should be greyed out. Same goes for the selected Exit point if you're in the entry view. Furthermore you should be able to click an already selected list item in order to get to the next step of the flow (Entry to Exit, Exit to Main view).
This change is