Migrating to 08.1376, fixing code smells and refining UI elements because of external deprecation (but old problems arise).
This commit is contained in:
parent
a84e9504f9
commit
36c261d534
@ -0,0 +1,9 @@
|
|||||||
|
accessing
|
||||||
|
avatarPicture
|
||||||
|
| response |
|
||||||
|
response := ZnClient new url: (self profileImageUrl); get; response.
|
||||||
|
response contentType = ZnMimeType imageJpeg
|
||||||
|
ifTrue: [ ^ (JPEGReadWriter gtFromBuffer: response contents) asElement ].
|
||||||
|
response contentType = ZnMimeType imagePng
|
||||||
|
ifTrue: [ ^ (PNGReadWriter gtFromBuffer: response contents) asElement ].
|
||||||
|
^ BlElement new background: Color gray
|
@ -39,5 +39,5 @@ fromNitterTimelineItem: xmlItem
|
|||||||
metadata
|
metadata
|
||||||
at: 'pinned'
|
at: 'pinned'
|
||||||
put: (((xmlItem xpath: '//div[@class="pinned"]') stringValue trimmed) = 'Pinned Tweet'
|
put: (((xmlItem xpath: '//div[@class="pinned"]') stringValue trimmed) = 'Pinned Tweet'
|
||||||
ifTrue: [ True ]
|
ifTrue: [ true ]
|
||||||
ifFalse: [ False ])
|
ifFalse: [ false ])
|
@ -12,7 +12,7 @@ gtViewProfileDetailsOn: aView
|
|||||||
c vertical fitContent.
|
c vertical fitContent.
|
||||||
c horizontal matchParent ];
|
c horizontal matchParent ];
|
||||||
padding: (BlInsets all: 10).
|
padding: (BlInsets all: 10).
|
||||||
imageContainer := BlLazyElement new
|
imageContainer := self avatarPicture;
|
||||||
withGlamorousPreview;
|
withGlamorousPreview;
|
||||||
aptitude: BrShadowAptitude new;
|
aptitude: BrShadowAptitude new;
|
||||||
background: Color white;
|
background: Color white;
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
accessing
|
accessing
|
||||||
profileImage
|
profileImage
|
||||||
^ BlUrlImageElement url: self profileImageUrl
|
| imageTemp |
|
||||||
"The previous version has something like
|
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 on: Error do: [ ^ GtABContact new avatar ].
|
||||||
^ imageTemp value asElement
|
^ imageTemp value asElement
|
||||||
Should a generic avatar be reimplemented?"
|
"Should a generic avatar be reimplemented?"
|
Loading…
Reference in New Issue
Block a user