-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent user from selecting same entry and exit relay for multihop #6455
Prevent user from selecting same entry and exit relay for multihop #6455
Conversation
859fe47
to
68356f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exclusion is all done in tableView(cellForRowAt)
. The main reason for this is that the function is very reliable if you want to apply changes during every table update without rebuilding the underlying data set. Since we want to keep the UI state (unfolded cells, position etc) while toggling multihop this is by far the least complex place to "patch" cell contents. We could let the diffable data source handle it for us, but since 1) cell content isn't updated unless the underlying data is changed (which would require adding exclusion state in the nodes, which in turn requires more complexity when populating and manipulating the node tree) and 2) the view state needs to be tracked and rebuilt every time, I opted for the easiest method, knowing that we want to make changes to multihop in the near future anyway.
Reviewable status: 0 of 8 files reviewed, all discussions resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, looking at my local git history, Emils' c86bcc3
commit is on top of main. I have rebased from main just now but the commit still wants to be included in this PR for some reason.
Reviewable status: 0 of 8 files reviewed, all discussions resolved
68356f0
to
9094179
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: 1 of 7 files reviewed, all discussions resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 7 files reviewed, all discussions resolved
9094179
to
5311870
Compare
When displaying either the entry or exit location lists, any location (country, city or relay) shouldn't be selectable if, after apply all other constraints, the location item resolves to a single candidate that is already selected by the entry.
This change is