This PR removes or refactors most alerts in the app.
It doesn't quite remove DuffekDialog or its external dependency on NYAlertController, leaving a couple uses: a date picker and the runnable range picker, used when reporting a flow or posting a photo.
In several places, an alert was used to deal with an error state the app just shouldn't get into, and I've removed the alert and either refactored to make the state impossible or done some light UI adustment to prevent it. Notes in the commit messages for these.
This PR also refactors and removes the Location singleton, turning it into extensions on CLLocationManager and MKMapView, and a static helper that returns a UIAlertController with a 'location denied' message. When that alert is shown, a view controller is now always responsible for presenting it.
Fixes #229, more or less
Remove funcs with no callers from DuffekDialog
Replace straightforward OK dialogs with UIAlertController
Remove SignInViewController.referenceViewController, which had no callers
Change to a little more ergonomic way of making SignInViewControllers
Remove dialog presentation from within AWGQLApiHelper
Remove all but one use of DuffekDialog.showStandardDialog
Remove empty submit alert from AddAlertTableViewController
Remove an error alert that would never be shown
Remove an alert presented if AddRiverFlowTableViewController had no selected run
Remove error alerts from GalleryViewController
Remove no longer used parts of DuffekDialog
Unify the 2 Location.checkLocationStatus funcs, adding a param
Turn Location.hasLocation(mapView:) into MKMapView.hasLocation
Remove Location singleton
Remove DuffekDialog.showStandardDialog, now unused
This PR removes or refactors most alerts in the app.
It doesn't quite remove DuffekDialog or its external dependency on NYAlertController, leaving a couple uses: a date picker and the runnable range picker, used when reporting a flow or posting a photo.
In several places, an alert was used to deal with an error state the app just shouldn't get into, and I've removed the alert and either refactored to make the state impossible or done some light UI adustment to prevent it. Notes in the commit messages for these.
This PR also refactors and removes the Location singleton, turning it into extensions on CLLocationManager and MKMapView, and a static helper that returns a UIAlertController with a 'location denied' message. When that alert is shown, a view controller is now always responsible for presenting it.
Fixes #229, more or less