diff --git a/Socialmetrica.package/NitterUser.class/instance/avatarPicture.st b/Socialmetrica.package/NitterUser.class/instance/avatarPicture.st index 20ffe5d..0f6e1a3 100644 --- a/Socialmetrica.package/NitterUser.class/instance/avatarPicture.st +++ b/Socialmetrica.package/NitterUser.class/instance/avatarPicture.st @@ -1,9 +1,10 @@ accessing avatarPicture - | response | + | response tempImage | response := ZnClient new url: (self profileImageUrl); get; response. response contentType = ZnMimeType imageJpeg - ifTrue: [ ^ (JPEGReadWriter gtFromBuffer: response contents) asElement ]. + ifTrue: [ ^ (PluginBasedJPEGReadWriter gtFromBuffer: response contents) asElement ]. response contentType = ZnMimeType imagePng ifTrue: [ ^ (PNGReadWriter gtFromBuffer: response contents) asElement ]. - ^ BlElement new background: Color gray \ No newline at end of file + tempImage on: Error do: [ ^ GtABContact new avatar ]. + ^ tempImage value asElement . \ No newline at end of file diff --git a/Socialmetrica.package/TwitterUser.class/instance/avatarPicture.st b/Socialmetrica.package/TwitterUser.class/instance/avatarPicture.st new file mode 100644 index 0000000..e894e37 --- /dev/null +++ b/Socialmetrica.package/TwitterUser.class/instance/avatarPicture.st @@ -0,0 +1,3 @@ +ui +avatarPicture + ^ self subclassResponsibility \ No newline at end of file diff --git a/Socialmetrica.package/TwitterUser.class/instance/gtViewProfileDetailsOn..st b/Socialmetrica.package/TwitterUser.class/instance/gtViewProfileDetailsOn..st index d479662..46fe345 100644 --- a/Socialmetrica.package/TwitterUser.class/instance/gtViewProfileDetailsOn..st +++ b/Socialmetrica.package/TwitterUser.class/instance/gtViewProfileDetailsOn..st @@ -5,20 +5,11 @@ gtViewProfileDetailsOn: aView title: 'Details' translated; priority: 5; stencil: [ - | container imageContainer | + | container | container := BlElement new layout: BlFlowLayout new; constraintsDo: [ :c | c vertical fitContent. c horizontal matchParent ]; padding: (BlInsets all: 10). - imageContainer := self avatarPicture; - withGlamorousPreview; - aptitude: BrShadowAptitude new; - background: Color white; - margin: (BlInsets all: 20); - constraintsDo: [ :c | - c vertical exact: 175. - c horizontal matchParent ]; - elementBuilder: [ self asCardElement margin: (BlInsets all: 20) ]. - container addChild: imageContainer]. \ No newline at end of file + container addChild: self asCardElement ]. \ No newline at end of file diff --git a/Socialmetrica.package/TwitterUser.class/instance/profileImage.st b/Socialmetrica.package/TwitterUser.class/instance/profileImage.st index 315065f..c59cfbc 100644 --- a/Socialmetrica.package/TwitterUser.class/instance/profileImage.st +++ b/Socialmetrica.package/TwitterUser.class/instance/profileImage.st @@ -1,8 +1,3 @@ accessing profileImage - | imageTemp | - imageTemp := BrAsyncFileWidget new url: self profileImageUrl. - "Going back to the previous version after BlLazyElement that solved the issues was deprecated" - imageTemp on: Error do: [ ^ GtABContact new avatar ]. - ^ imageTemp value asElement - "Should a generic avatar be reimplemented?" \ No newline at end of file + ^ self avatarPicture \ No newline at end of file