File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
arduino-ide-extension/src/browser/theia/messages Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 11import * as React from '@theia/core/shared/react' ;
22import * as ReactDOM from '@theia/core/shared/react-dom' ;
3- import { injectable } from '@theia/core/shared/inversify' ;
3+ import {
4+ inject ,
5+ injectable ,
6+ postConstruct ,
7+ } from '@theia/core/shared/inversify' ;
48import { NotificationCenterComponent } from './notification-center-component' ;
59import { NotificationToastsComponent } from './notification-toasts-component' ;
610import { NotificationsRenderer as TheiaNotificationsRenderer } from '@theia/messages/lib/browser/notifications-renderer' ;
11+ import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state' ;
712
813@injectable ( )
914export class NotificationsRenderer extends TheiaNotificationsRenderer {
15+ @inject ( FrontendApplicationStateService )
16+ private readonly appStateService : FrontendApplicationStateService ;
17+
18+ @postConstruct ( )
19+ protected override init ( ) : void {
20+ // Unlike Theia, IDE2 renders the notification area only when the app is ready.
21+ this . appStateService . reachedState ( 'ready' ) . then ( ( ) => {
22+ this . createOverlayContainer ( ) ;
23+ this . render ( ) ;
24+ } ) ;
25+ }
26+
1027 protected override render ( ) : void {
1128 ReactDOM . render (
1229 < div >
You can’t perform that action at this time.
0 commit comments