Merge branch 'quick_action_fix' of ssh://github.com/osmandapp/Osmand into quick_action_fix
This commit is contained in:
commit
3cc9da91d7
1 changed files with 7 additions and 5 deletions
|
@ -80,12 +80,14 @@ public class NavStartStopAction extends QuickAction {
|
|||
@Override
|
||||
public int getIconRes(Context context) {
|
||||
if (context instanceof MapActivity) {
|
||||
RoutingHelper helper = ((MapActivity) context).getRoutingHelper();
|
||||
if (helper.isPauseNavigation() || helper.isFollowingMode()) {
|
||||
return R.drawable.ic_action_target;
|
||||
}
|
||||
return R.drawable.ic_action_start_navigation;
|
||||
return ((MapActivity) context).getMyApplication().getSettings().getApplicationMode().getMapIconId();
|
||||
}
|
||||
return super.getIconRes(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isActionWithSlash(OsmandApplication application) {
|
||||
RoutingHelper helper = application.getRoutingHelper();
|
||||
return helper.isPauseNavigation() || helper.isFollowingMode();
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue