align with FavoritesListFrag for now

This commit is contained in:
sonora 2014-12-31 00:58:45 +01:00
parent 3bd72aa7f3
commit facc9fc92d

View file

@ -75,14 +75,14 @@ public class SearchHistoryFragment extends SherlockListFragment implements Sear
public void onResume() {
super.onResume();
FragmentActivity activity = getActivity();
//Intent intent = activity.getIntent();
//if (intent != null) {
// double lat = intent.getDoubleExtra(SEARCH_LAT, 0);
// double lon = intent.getDoubleExtra(SEARCH_LON, 0);
// if (lat != 0 || lon != 0) {
// historyAdapter.location = new LatLon(lat, lon);
// }
//}
Intent intent = activity.getIntent();
if (intent != null) {
double lat = intent.getDoubleExtra(SEARCH_LAT, 0);
double lon = intent.getDoubleExtra(SEARCH_LON, 0);
if (lat != 0 || lon != 0) {
historyAdapter.location = new LatLon(lat, lon);
}
}
if (location == null && activity instanceof SearchActivity) {
location = ((SearchActivity) activity).getSearchPoint();
}