Merge 33013dc52f
This commit is contained in:
commit
0f62345220
@ -1,10 +1,9 @@
|
||||
accessing
|
||||
avatarPicture
|
||||
| response tempImage |
|
||||
| response |
|
||||
response := ZnClient new url: (self profileImageUrl); get; response.
|
||||
response contentType = ZnMimeType imageJpeg
|
||||
ifTrue: [ tempImage := (PluginBasedJPEGReadWriter gtFromBuffer: response contents) asElement ].
|
||||
ifTrue: [ ^ (PluginBasedJPEGReadWriter gtFromBuffer: response contents) asElement ].
|
||||
response contentType = ZnMimeType imagePng
|
||||
ifTrue: [ tempImage := (PNGReadWriter gtFromBuffer: response contents) asElement ].
|
||||
tempImage on: Error do: [ ^ GtABContact new avatar ].
|
||||
^ tempImage value asElement .
|
||||
ifTrue: [ ^ (PNGReadWriter gtFromBuffer: response contents) asElement ].
|
||||
^ GtABContact new avatar
|
Loading…
Reference in New Issue
Block a user