finalize fix for distance update issue for SearchHistory and SearchAddressOnline

This commit is contained in:
sonora 2014-12-30 13:19:03 +01:00
parent f292628128
commit 65f8b14505
2 changed files with 2 additions and 4 deletions

View file

@ -123,7 +123,7 @@ public class SearchAddressOnlineFragment extends SherlockFragment implements Sea
double lat = intent.getDoubleExtra(SearchActivity.SEARCH_LAT, 0);
double lon = intent.getDoubleExtra(SearchActivity.SEARCH_LON, 0);
if(lat != 0 || lon != 0){
location = new LatLon(lat, lon);
adapter.location = new LatLon(lat, lon);
}
}
if (location == null && getActivity() instanceof SearchActivity) {
@ -132,8 +132,7 @@ public class SearchAddressOnlineFragment extends SherlockFragment implements Sea
if (location == null) {
location = settings.getLastKnownMapLocation();
}
//TODO: Next line somehow breaks that distances are updated in list after origin is changed, but omitting it leads to no distences are shown upon first list view
//locationUpdate(location);
locationUpdate(location);
}
@Override

View file

@ -89,7 +89,6 @@ public class SearchHistoryFragment extends SherlockListFragment implements Sear
if (location == null) {
location = ((OsmandApplication) activity.getApplication()).getSettings().getLastKnownMapLocation();
}
//TODO: Next line somehow breaks that distances are updated in list after origin is changed, but omitting it leads to no distences are shown upon first list view
locationUpdate(location);
clearButton.setVisibility(historyAdapter.isEmpty() ? View.GONE : View.VISIBLE);