check if this fixes sporadic appearance of DashFavFrag

This commit is contained in:
sonora 2014-12-24 13:32:34 +01:00
parent 36e643e7ba
commit a19c84c931

View file

@ -59,6 +59,17 @@ public class DashFavoritesFragment extends DashBaseFragment {
} }
}); });
if (getMyApplication().getFavorites().getFavouritePoints().size() > 0) {
if(!getMyApplication().getSettings().isLastKnownMapLocation()) {
// show first time when application ran
location = getMyApplication().getLocationProvider().getFirstTimeRunDefaultLocation();
} else {
location = getLocationProvider().getLastKnownLocation();
}
updateLocation(location);
}
setupFavorites();
return view; return view;
} }
@ -76,10 +87,7 @@ public class DashFavoritesFragment extends DashBaseFragment {
} }
updateLocation(location); updateLocation(location);
} }
setupFavorites(); setupFavorites();
} }
@ -185,7 +193,6 @@ public class DashFavoritesFragment extends DashBaseFragment {
} }
this.location = location; this.location = location;
updateArrows(); updateArrows();
} }
private OsmAndLocationProvider getLocationProvider() { private OsmAndLocationProvider getLocationProvider() {