From d2b739cd32c226f1cf7fbdad33bef7e9361f4d60 Mon Sep 17 00:00:00 2001 From: kingofirony Date: Tue, 21 Jul 2015 12:22:54 -0400 Subject: [PATCH] fixes orientation breaking reverse geo --- .../com/mapzen/erasermap/presenter/MainPresenterImpl.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/mapzen/erasermap/presenter/MainPresenterImpl.kt b/app/src/main/kotlin/com/mapzen/erasermap/presenter/MainPresenterImpl.kt index 3771cd6e..e4966f7f 100644 --- a/app/src/main/kotlin/com/mapzen/erasermap/presenter/MainPresenterImpl.kt +++ b/app/src/main/kotlin/com/mapzen/erasermap/presenter/MainPresenterImpl.kt @@ -50,13 +50,16 @@ public class MainPresenterImpl() : MainPresenter { } override fun onReverseGeocodeResultsAvailable(searchResults: Result?) { + var features = ArrayList() this.searchResults = searchResults if(searchResults?.getFeatures()?.isEmpty() as Boolean) { - var features = ArrayList() features.add(currentFeature) mainViewController?.showReverseGeocodeFeature(features) + searchResults?.setFeatures(features) } else { - mainViewController?.showReverseGeocodeFeature(searchResults?.getFeatures()) + features.add(searchResults?.getFeatures()?.get(0)) + searchResults?.setFeatures(features) + mainViewController?.showReverseGeocodeFeature(features) } }