Fix reverse geocoder error handling

pull/1376/head
Alex Baker 4 years ago
parent e2436414eb
commit 0b0177e608

@ -241,16 +241,16 @@ class LocationPickerActivity : InjectingAppCompatActivity(), Toolbar.OnMenuItemC
fun selectLocation() {
val mapPosition = map.mapPosition ?: return
loadingIndicator.visibility = View.VISIBLE
try {
lifecycleScope.launch {
try {
returnPlace(geocoder.reverseGeocode(mapPosition) ?: newPlace(mapPosition))
}
} catch (e: Exception) {
loadingIndicator.visibility = View.GONE
firebase.reportException(e)
toaster.longToast(e.message)
}
}
}
@OnClick(R.id.search)
fun searchPlace() {

Loading…
Cancel
Save