diff --git a/src/engine/runtime.js b/src/engine/runtime.js index 266e2ce87..f34ccb604 100644 --- a/src/engine/runtime.js +++ b/src/engine/runtime.js @@ -497,6 +497,7 @@ class Runtime extends EventEmitter { const categoryInfo = { id: extensionInfo.id, name: maybeFormatMessage(extensionInfo.name), + showStatusButton: extensionInfo.showStatusButton, blockIconURI: extensionInfo.blockIconURI, menuIconURI: extensionInfo.menuIconURI, color1: extensionInfo.colour || '#FF6680', @@ -547,15 +548,6 @@ class Runtime extends EventEmitter { } } - // Add extension status button - if (extensionInfo.showStatusButton) { - categoryInfo.blocks.push({ - info: {}, - json: null, - xml: `` - }); - } - for (const blockInfo of extensionInfo.blocks) { if (blockInfo === '---') { categoryInfo.blocks.push(ConvertedSeparator); @@ -854,7 +846,13 @@ class Runtime extends EventEmitter { const menuIconXML = menuIconURI ? `iconURI="${menuIconURI}"` : ''; - xmlParts.push(``); + let statusButtonXML = ''; + if (categoryInfo.showStatusButton) { + statusButtonXML = 'showStatusButton="true"'; + } + + xmlParts.push(``); xmlParts.push.apply(xmlParts, paletteBlocks.map(block => block.xml)); xmlParts.push(''); }