-
Notifications
You must be signed in to change notification settings - Fork 12
Feature (Home): Sort Section List Items by Distance to User #467
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
base: master
Are you sure you want to change the base?
Conversation
| // Sort items by proximity to user (ascending) | ||
| // utilizes the CLLocation.distanceFromUser() helper | ||
| // items without lat/lon sent to the bottom |
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.
remove comment
| // items -> sortedItems in both forEach calls | ||
| // displays all items as tappable rows |
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.
remove comment
| }) { | ||
| } label: { |
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.
for buttons, we typically do something like this:
Button (action: {
}) {
}What you have is valid, but since label is the last parameter and it is a closure, we can use the trailing closure syntax: https://www.hackingwithswift.com/sixty/6/5/trailing-closure-syntax
|
|
||
| BMHomeSectionListView(sectionType: .dining, items: diningHalls, mapViewController: MapViewController()) | ||
| } | ||
|
|
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.
remove newline
Changes Made
Testing steps
Resolves #436