not show extension in Map source item

This commit is contained in:
veliymolfar 2020-06-12 18:08:08 +03:00
parent 5739510fd4
commit d761ea406e
2 changed files with 4 additions and 2 deletions

View file

@ -18,6 +18,7 @@ import androidx.core.content.ContextCompat;
import net.osmand.CallbackWithObject; import net.osmand.CallbackWithObject;
import net.osmand.GPXUtilities.GPXFile; import net.osmand.GPXUtilities.GPXFile;
import net.osmand.GPXUtilities.WptPt; import net.osmand.GPXUtilities.WptPt;
import net.osmand.IndexConstants;
import net.osmand.ResultMatcher; import net.osmand.ResultMatcher;
import net.osmand.StateChangedListener; import net.osmand.StateChangedListener;
import net.osmand.map.ITileSource; import net.osmand.map.ITileSource;
@ -537,7 +538,7 @@ public class MapActivityLayers {
default: default:
settings.MAP_TILE_SOURCES.set(layerKey); settings.MAP_TILE_SOURCES.set(layerKey);
settings.MAP_ONLINE_DATA.set(true); settings.MAP_ONLINE_DATA.set(true);
updateItem(it, adapter, layerKey); updateItem(it, adapter, layerKey.replace(IndexConstants.SQLITE_EXT, ""));
updateMapSource(mapView, settings.MAP_TILE_SOURCES); updateMapSource(mapView, settings.MAP_TILE_SOURCES);
break; break;
} }

View file

@ -27,6 +27,7 @@ import androidx.core.content.ContextCompat;
import net.osmand.AndroidUtils; import net.osmand.AndroidUtils;
import net.osmand.CallbackWithObject; import net.osmand.CallbackWithObject;
import net.osmand.GPXUtilities; import net.osmand.GPXUtilities;
import net.osmand.IndexConstants;
import net.osmand.PlatformUtil; import net.osmand.PlatformUtil;
import net.osmand.core.android.MapRendererContext; import net.osmand.core.android.MapRendererContext;
import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuAdapter;
@ -460,7 +461,7 @@ public class ConfigureMapMenu {
.setId(MAP_SOURCE_ID) .setId(MAP_SOURCE_ID)
.setTitleId(R.string.layer_map, activity) .setTitleId(R.string.layer_map, activity)
.setIcon(R.drawable.ic_world_globe_dark) .setIcon(R.drawable.ic_world_globe_dark)
.setDescription(settings.MAP_ONLINE_DATA.get() ? settings.MAP_TILE_SOURCES.get() : null) .setDescription(settings.MAP_ONLINE_DATA.get() ? settings.MAP_TILE_SOURCES.get().replace(IndexConstants.SQLITE_EXT, "") : null)
.setItemDeleteAction(makeDeleteAction(settings.MAP_ONLINE_DATA, settings.MAP_TILE_SOURCES)) .setItemDeleteAction(makeDeleteAction(settings.MAP_ONLINE_DATA, settings.MAP_TILE_SOURCES))
.setListener(l).createItem()); .setListener(l).createItem());