@@ -169,10 +169,7 @@ qx.Class.define("osparc.navigation.UserMenu", {
169169 this . getChildControl ( "theme-switcher" ) ;
170170 this . addSeparator ( ) ;
171171
172- const announcementUIFactory = osparc . announcement . AnnouncementUIFactory . getInstance ( ) ;
173- if ( announcementUIFactory . hasUserMenuAnnouncement ( ) ) {
174- announcementUIFactory . createUserMenuAnnouncements ( ) . forEach ( announcement => this . add ( announcement ) ) ;
175- }
172+ this . __addAnnouncements ( ) ;
176173 this . getChildControl ( "about" ) ;
177174 if ( osparc . product . Utils . showAboutProduct ( ) ) {
178175 this . getChildControl ( "about-product" ) ;
@@ -188,6 +185,13 @@ qx.Class.define("osparc.navigation.UserMenu", {
188185 osparc . utils . Utils . prettifyMenu ( this ) ;
189186 } ,
190187
188+ __addAnnouncements : function ( ) {
189+ const announcementUIFactory = osparc . announcement . AnnouncementUIFactory . getInstance ( ) ;
190+ if ( announcementUIFactory . hasUserMenuAnnouncement ( ) ) {
191+ announcementUIFactory . createUserMenuAnnouncements ( ) . forEach ( announcement => this . add ( announcement ) ) ;
192+ }
193+ } ,
194+
191195 populateMenuCompact : function ( ) {
192196 this . removeAll ( ) ;
193197 const authData = osparc . auth . Data . getInstance ( ) ;
@@ -225,10 +229,7 @@ qx.Class.define("osparc.navigation.UserMenu", {
225229 this . getChildControl ( "theme-switcher" ) ;
226230 this . addSeparator ( ) ;
227231
228- const announcementUIFactory = osparc . announcement . AnnouncementUIFactory . getInstance ( ) ;
229- if ( announcementUIFactory . hasUserMenuAnnouncement ( ) ) {
230- announcementUIFactory . createUserMenuAnnouncements ( ) . forEach ( announcement => this . add ( announcement ) ) ;
231- }
232+ this . __addAnnouncements ( ) ;
232233 this . getChildControl ( "about" ) ;
233234 if ( ! osparc . product . Utils . isProduct ( "osparc" ) ) {
234235 this . getChildControl ( "about-product" ) ;
0 commit comments