Merge branch 'quick_action_fix' of ssh://github.com/osmandapp/Osmand into quick_action_fix

This commit is contained in:
PavelRatushnyi 2017-10-14 17:16:30 +03:00
commit 3cc9da91d7

View file

@ -80,12 +80,14 @@ public class NavStartStopAction extends QuickAction {
@Override @Override
public int getIconRes(Context context) { public int getIconRes(Context context) {
if (context instanceof MapActivity) { if (context instanceof MapActivity) {
RoutingHelper helper = ((MapActivity) context).getRoutingHelper(); return ((MapActivity) context).getMyApplication().getSettings().getApplicationMode().getMapIconId();
if (helper.isPauseNavigation() || helper.isFollowingMode()) {
return R.drawable.ic_action_target;
}
return R.drawable.ic_action_start_navigation;
} }
return super.getIconRes(context); return super.getIconRes(context);
} }
@Override
public boolean isActionWithSlash(OsmandApplication application) {
RoutingHelper helper = application.getRoutingHelper();
return helper.isPauseNavigation() || helper.isFollowingMode();
}
} }