check if this fixes sporadic appearance of DashFavFrag
This commit is contained in:
parent
36e643e7ba
commit
a19c84c931
1 changed files with 11 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -76,10 +87,7 @@ public class DashFavoritesFragment extends DashBaseFragment {
|
|||
}
|
||||
updateLocation(location);
|
||||
}
|
||||
|
||||
|
||||
setupFavorites();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -185,7 +193,6 @@ public class DashFavoritesFragment extends DashBaseFragment {
|
|||
}
|
||||
this.location = location;
|
||||
updateArrows();
|
||||
|
||||
}
|
||||
|
||||
private OsmAndLocationProvider getLocationProvider() {
|
||||
|
|
Loading…
Reference in a new issue