@@ -579,7 +579,7 @@ export class ExtensionEditor extends EditorPane {
579
579
let preReleaseText : string | undefined ;
580
580
reset ( template . preReleaseText ) ;
581
581
const disposables = this . transientDisposables . add ( new DisposableStore ( ) ) ;
582
- const updatePreReleaseText = ( ) => {
582
+ const updatePreReleaseText = ( layout : boolean ) => {
583
583
const newPreReleaseText = ExtensionHoverWidget . getPreReleaseMessage ( extension ) ;
584
584
if ( preReleaseText !== newPreReleaseText ) {
585
585
preReleaseText = newPreReleaseText ;
@@ -589,20 +589,23 @@ export class ExtensionEditor extends EditorPane {
589
589
append ( template . preReleaseText , $ ( `span${ ThemeIcon . asCSSSelector ( preReleaseIcon ) } ` ) ) ;
590
590
disposables . add ( this . renderMarkdownText ( preReleaseText , template . preReleaseText ) ) ;
591
591
}
592
+ if ( layout && this . dimension ) {
593
+ this . layout ( this . dimension ) ;
594
+ }
592
595
}
593
596
} ;
594
- updatePreReleaseText ( ) ;
597
+ updatePreReleaseText ( false ) ;
595
598
this . transientDisposables . add ( this . extensionsWorkbenchService . onChange ( e => {
596
599
if ( e && areSameExtensions ( e . identifier , extension . identifier ) ) {
597
- updatePreReleaseText ( ) ;
600
+ updatePreReleaseText ( true ) ;
598
601
}
599
602
} ) ) ;
600
603
}
601
604
602
605
private setStatus ( extension : IExtension , extensionStatus : ExtensionStatusAction , template : IExtensionEditorTemplate ) : void {
603
606
const disposables = new DisposableStore ( ) ;
604
607
this . transientDisposables . add ( disposables ) ;
605
- const updateStatus = ( ) => {
608
+ const updateStatus = ( layout : boolean ) => {
606
609
disposables . clear ( ) ;
607
610
reset ( template . status ) ;
608
611
const status = extensionStatus . status ;
@@ -613,17 +616,20 @@ export class ExtensionEditor extends EditorPane {
613
616
}
614
617
disposables . add ( this . renderMarkdownText ( status . message . value , append ( template . status , $ ( '.status-text' ) ) ) ) ;
615
618
}
619
+ if ( layout && this . dimension ) {
620
+ this . layout ( this . dimension ) ;
621
+ }
616
622
} ;
617
- updateStatus ( ) ;
618
- this . transientDisposables . add ( extensionStatus . onDidChangeStatus ( ( ) => updateStatus ( ) ) ) ;
623
+ updateStatus ( false ) ;
624
+ this . transientDisposables . add ( extensionStatus . onDidChangeStatus ( ( ) => updateStatus ( true ) ) ) ;
619
625
620
626
const updateActionLayout = ( ) => template . actionsAndStatusContainer . classList . toggle ( 'list-layout' , extension . state === ExtensionState . Installed ) ;
621
627
updateActionLayout ( ) ;
622
628
this . transientDisposables . add ( this . extensionsWorkbenchService . onChange ( ( ) => updateActionLayout ( ) ) ) ;
623
629
}
624
630
625
631
private setRecommendationText ( extension : IExtension , template : IExtensionEditorTemplate ) : void {
626
- const updateRecommendationText = ( ) => {
632
+ const updateRecommendationText = ( layout : boolean ) => {
627
633
reset ( template . recommendation ) ;
628
634
const extRecommendations = this . extensionRecommendationsService . getAllRecommendationsWithReason ( ) ;
629
635
if ( extRecommendations [ extension . identifier . id . toLowerCase ( ) ] ) {
@@ -635,9 +641,12 @@ export class ExtensionEditor extends EditorPane {
635
641
} else if ( this . extensionIgnoredRecommendationsService . globalIgnoredRecommendations . indexOf ( extension . identifier . id . toLowerCase ( ) ) !== - 1 ) {
636
642
append ( template . recommendation , $ ( `div.recommendation-text` , undefined , localize ( 'recommendationHasBeenIgnored' , "You have chosen not to receive recommendations for this extension." ) ) ) ;
637
643
}
644
+ if ( layout && this . dimension ) {
645
+ this . layout ( this . dimension ) ;
646
+ }
638
647
} ;
639
- updateRecommendationText ( ) ;
640
- this . transientDisposables . add ( this . extensionRecommendationsService . onDidChangeRecommendations ( ( ) => updateRecommendationText ( ) ) ) ;
648
+ updateRecommendationText ( false ) ;
649
+ this . transientDisposables . add ( this . extensionRecommendationsService . onDidChangeRecommendations ( ( ) => updateRecommendationText ( true ) ) ) ;
641
650
}
642
651
643
652
private renderMarkdownText ( markdownText : string , parent : HTMLElement ) : IDisposable {
0 commit comments