Skip to content
This repository was archived by the owner on Apr 8, 2019. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ extension BookableDetailsViewController: AvailabilityCheckDelegate {
func availabilityCheckDidFailWith(_ error: Error) {
tableView.isUserInteractionEnabled = true

errorContext?.error = BookingError.noDate
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the same error.. noDate means date has not been provided.

Error context is not necessary for this callback.

Is there a reason you added this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add a new error to describe no network connectivity

When the availability check fails, the errorContext is not updated and the screen is not reupdated.

https://www.useloom.com/share/a1434a21f9b94d198e3f1536cd8ae293

At the end of the video there is no network connectivity, when the user tries to close the date picker by clicking on the date row, the app crashes because the amount of rows available is not updated.


let alert = UIAlertController(title: "Error", message: "Sorry, something went wrong!", preferredStyle: .alert)
let action = UIAlertAction(title: "OK", style: .cancel, handler: nil)
alert.addAction(action)
Expand Down