2021-08-13 00:58:41 +00:00
|
|
|
accessing
|
|
|
|
profileImage
|
|
|
|
| response |
|
|
|
|
response := ZnClient new url: (self profileImageUrl); get; response.
|
|
|
|
response contentType = ZnMimeType imageJpeg
|
2021-08-13 16:53:03 +00:00
|
|
|
ifTrue: [ | imageTemp |
|
2021-08-22 00:47:09 +00:00
|
|
|
imageTemp := [ JPEGReadWriter gtFromBuffer: response contents ].
|
2021-08-13 16:53:03 +00:00
|
|
|
imageTemp on: Error do: [ ^ GtABContact new avatar ].
|
|
|
|
^ imageTemp value asElement
|
|
|
|
].
|
2021-08-13 00:58:41 +00:00
|
|
|
response contentType = ZnMimeType imagePng
|
2021-08-13 16:53:03 +00:00
|
|
|
ifTrue: [ | imageTemp |
|
2021-08-22 00:47:09 +00:00
|
|
|
imageTemp := [ PNGReadWriter gtFromBuffer: response contents ].
|
2021-08-13 16:53:03 +00:00
|
|
|
imageTemp on: Error do: [ ^ GtABContact new avatar ].
|
|
|
|
^ imageTemp value asElement
|
|
|
|
].
|
2021-08-13 00:58:41 +00:00
|
|
|
^ BlElement new background: Color gray
|