Remove unnecessary changes
This commit is contained in:
parent
e1f56f6915
commit
70c907c010
1 changed files with 13 additions and 18 deletions
|
@ -402,27 +402,22 @@ public class SettingsHelper {
|
|||
@Override
|
||||
public void apply() {
|
||||
if (shouldReplace || !exists()) {
|
||||
OsmandPlugin.addCustomPlugin(app, plugin);
|
||||
}
|
||||
CustomOsmandPlugin customPlugin = (CustomOsmandPlugin) OsmandPlugin.getPlugin(getPluginId());
|
||||
updatePluginItems(customPlugin);
|
||||
}
|
||||
|
||||
private void updatePluginItems(CustomOsmandPlugin customPlugin) {
|
||||
for (SettingsHelper.SettingsItem item : pluginDependentItems) {
|
||||
if (item instanceof SettingsHelper.FileSettingsItem) {
|
||||
FileSettingsItem fileItem = (FileSettingsItem) item;
|
||||
if (fileItem.getSubtype() == FileSettingsItem.FileSubtype.RENDERING_STYLE) {
|
||||
customPlugin.addRenderer(fileItem.getName());
|
||||
plugin.addRenderer(fileItem.getName());
|
||||
} else if (fileItem.getSubtype() == FileSettingsItem.FileSubtype.ROUTING_CONFIG) {
|
||||
customPlugin.addRouter(fileItem.getName());
|
||||
plugin.addRouter(fileItem.getName());
|
||||
} else if (fileItem.getSubtype() == FileSettingsItem.FileSubtype.OTHER) {
|
||||
customPlugin.setResourceDirName(item.getFileName());
|
||||
plugin.setResourceDirName(item.getFileName());
|
||||
}
|
||||
} else if (item instanceof SuggestedDownloadsItem) {
|
||||
customPlugin.updateSuggestedDownloads(((SuggestedDownloadsItem) item).items);
|
||||
plugin.updateSuggestedDownloads(((SuggestedDownloadsItem) item).getItems());
|
||||
}
|
||||
}
|
||||
OsmandPlugin.addCustomPlugin(app, plugin);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue