File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -113,10 +113,8 @@ qx.Class.define("osparc.info.CommentUI", {
113113
114114 __buildLayout : function ( ) {
115115 const thumbnail = this . getChildControl ( "thumbnail" ) ;
116- thumbnail . setSource ( osparc . utils . Avatar . emailToThumbnail ( "" , "" , 32 ) ) ;
117116
118117 const userName = this . getChildControl ( "user-name" ) ;
119- userName . setValue ( "Unknown" ) ;
120118
121119 const date = new Date ( this . __comment [ "modified" ] ) ;
122120 const date2 = osparc . utils . Utils . formatDateAndTime ( date ) ;
@@ -131,7 +129,14 @@ qx.Class.define("osparc.info.CommentUI", {
131129 if ( user ) {
132130 thumbnail . setSource ( user . getThumbnail ( ) ) ;
133131 userName . setValue ( user . getLabel ( ) ) ;
132+ } else {
133+ thumbnail . setSource ( osparc . utils . Avatar . emailToThumbnail ( ) ) ;
134+ userName . setValue ( "Unknown user" ) ;
134135 }
136+ } )
137+ . catch ( ( ) => {
138+ thumbnail . setSource ( osparc . utils . Avatar . emailToThumbnail ( ) ) ;
139+ userName . setValue ( "Unknown user" ) ;
135140 } ) ;
136141
137142 this . getChildControl ( "spacer" ) ;
Original file line number Diff line number Diff line change @@ -34,12 +34,7 @@ qx.Class.define("osparc.utils.Avatar", {
3434 type : "static" ,
3535
3636 statics : {
37- emailToThumbnail : function ( email , username ) {
38- return this . __getUrl ( email , username , 32 ) ;
39- } ,
40-
41- __getUrl : function ( email , username , size = 100 ) {
42- email = email || "" ;
37+ emailToThumbnail : function ( email = "" , username = "??" , size = 32 ) {
4338 // MD5 (Message-Digest Algorithm) by WebToolkit
4439 const MD5 = function ( s ) {
4540 function L ( k , d ) {
You can’t perform that action at this time.
0 commit comments