Fix #9623 part 4 (remove tautology)
This commit is contained in:
parent
7534f8b28b
commit
b8a1032295
4 changed files with 8 additions and 8 deletions
|
@ -715,7 +715,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, IRouteInfo
|
|||
cm = mapActivity.getMapLayers().getMapWidgetRegistry().getViewConfigureMenuAdapter(mapActivity);
|
||||
} else if (visibleType == DashboardType.CONFIGURE_MAP) {
|
||||
configureMapMenu = new ConfigureMapMenu(mapActivity);
|
||||
cm = configureMapMenu.createListAdapter(mapActivity);
|
||||
cm = configureMapMenu.createListAdapter();
|
||||
} else if (visibleType == DashboardType.LIST_MENU) {
|
||||
cm = mapActivity.getMapActions().createMainOptionsMenu();
|
||||
} else if (visibleType == DashboardType.ROUTE_PREFERENCES) {
|
||||
|
|
|
@ -110,7 +110,7 @@ public class ConfigureMapMenu {
|
|||
private int selectedLanguageIndex;
|
||||
private boolean transliterateNames;
|
||||
|
||||
private MapActivity mapActivity;
|
||||
private MapActivity ma;
|
||||
private ContextMenuAdapter contextMenuAdapter;
|
||||
|
||||
public interface OnClickListener {
|
||||
|
@ -118,10 +118,10 @@ public class ConfigureMapMenu {
|
|||
}
|
||||
|
||||
public ConfigureMapMenu(MapActivity mapActivity) {
|
||||
this.mapActivity = mapActivity;
|
||||
this.ma = mapActivity;
|
||||
}
|
||||
|
||||
public ContextMenuAdapter createListAdapter(final MapActivity ma) {
|
||||
public ContextMenuAdapter createListAdapter() {
|
||||
OsmandApplication app = ma.getMyApplication();
|
||||
boolean nightMode = app.getDaynightHelper().isNightModeForMapControls();
|
||||
int themeRes = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme;
|
||||
|
@ -134,7 +134,7 @@ public class ConfigureMapMenu {
|
|||
adapter.setChangeAppModeListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick() {
|
||||
ma.getDashboard().updateListAdapter(createListAdapter(ma));
|
||||
ma.getDashboard().updateListAdapter(createListAdapter());
|
||||
}
|
||||
});
|
||||
List<RenderingRuleProperty> customRules = getCustomRules(app,
|
||||
|
@ -1132,7 +1132,7 @@ public class ConfigureMapMenu {
|
|||
}
|
||||
|
||||
private OsmandApplication getMyApplication() {
|
||||
return mapActivity.getMyApplication();
|
||||
return ma.getMyApplication();
|
||||
}
|
||||
|
||||
private static class StringSpinnerArrayAdapter extends ArrayAdapter<String> {
|
||||
|
|
|
@ -198,7 +198,7 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment
|
|||
break;
|
||||
case CONFIGURE_MAP:
|
||||
ConfigureMapMenu configureMapMenu = new ConfigureMapMenu((MapActivity) activity);
|
||||
contextMenuAdapter = configureMapMenu.createListAdapter((MapActivity) activity);
|
||||
contextMenuAdapter = configureMapMenu.createListAdapter();
|
||||
break;
|
||||
case CONTEXT_MENU_ACTIONS:
|
||||
MapContextMenu menu = ((MapActivity) activity).getContextMenu();
|
||||
|
|
|
@ -286,7 +286,7 @@ public class ConfigureMenuRootFragment extends BaseOsmAndFragment {
|
|||
break;
|
||||
case CONFIGURE_MAP:
|
||||
ConfigureMapMenu configureMapMenu = new ConfigureMapMenu((MapActivity) activity);
|
||||
contextMenuAdapter = configureMapMenu.createListAdapter((MapActivity) activity);
|
||||
contextMenuAdapter = configureMapMenu.createListAdapter();
|
||||
break;
|
||||
case CONTEXT_MENU_ACTIONS:
|
||||
MapContextMenu menu = ((MapActivity) activity).getContextMenu();
|
||||
|
|
Loading…
Reference in a new issue