From 390a6c3ef1bee5484d6769271ed5bcc0c8dfbde3 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Sat, 14 May 2022 18:17:34 -0500 Subject: [PATCH] Bugfix: Avatar picture. --- .../NitterUser.class/instance/avatarPicture.st | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Socialmetrica.package/NitterUser.class/instance/avatarPicture.st b/Socialmetrica.package/NitterUser.class/instance/avatarPicture.st index 7607c5e..8ee9fc7 100644 --- a/Socialmetrica.package/NitterUser.class/instance/avatarPicture.st +++ b/Socialmetrica.package/NitterUser.class/instance/avatarPicture.st @@ -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 . \ No newline at end of file + ifTrue: [ ^ (PNGReadWriter gtFromBuffer: response contents) asElement ]. + ^ GtABContact new avatar \ No newline at end of file