@@ -497,6 +497,7 @@ class Runtime extends EventEmitter {
497
497
const categoryInfo = {
498
498
id : extensionInfo . id ,
499
499
name : maybeFormatMessage ( extensionInfo . name ) ,
500
+ showStatusButton : extensionInfo . showStatusButton ,
500
501
blockIconURI : extensionInfo . blockIconURI ,
501
502
menuIconURI : extensionInfo . menuIconURI ,
502
503
color1 : extensionInfo . colour || '#FF6680' ,
@@ -547,15 +548,6 @@ class Runtime extends EventEmitter {
547
548
}
548
549
}
549
550
550
- // Add extension status button
551
- if ( extensionInfo . showStatusButton ) {
552
- categoryInfo . blocks . push ( {
553
- info : { } ,
554
- json : null ,
555
- xml : `<button type="status" extensionId="${ categoryInfo . id } "></button>`
556
- } ) ;
557
- }
558
-
559
551
for ( const blockInfo of extensionInfo . blocks ) {
560
552
if ( blockInfo === '---' ) {
561
553
categoryInfo . blocks . push ( ConvertedSeparator ) ;
@@ -854,7 +846,13 @@ class Runtime extends EventEmitter {
854
846
const menuIconXML = menuIconURI ?
855
847
`iconURI="${ menuIconURI } "` : '' ;
856
848
857
- xmlParts . push ( `<category name="${ name } " id="${ categoryInfo . id } " ${ colorXML } ${ menuIconXML } >` ) ;
849
+ let statusButtonXML = '' ;
850
+ if ( categoryInfo . showStatusButton ) {
851
+ statusButtonXML = 'showStatusButton="true"' ;
852
+ }
853
+
854
+ xmlParts . push ( `<category name="${ name } " id="${ categoryInfo . id } "
855
+ ${ statusButtonXML } ${ colorXML } ${ menuIconXML } >` ) ;
858
856
xmlParts . push . apply ( xmlParts , paletteBlocks . map ( block => block . xml ) ) ;
859
857
xmlParts . push ( '</category>' ) ;
860
858
}
0 commit comments