Fixing tweets rendeting: loading users from local DB or remote scrapping.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-04-16 22:36:46 -05:00
parent ee9050a9b9
commit 7de47a4959
5 changed files with 12 additions and 4 deletions

View File

@ -0,0 +1,3 @@
accessing
retrieveLocalContents
^ self class stored detect: [ :each | each userName = self userName ]

View File

@ -18,7 +18,7 @@ asCardElement
margin: (BlInsets left: 20); margin: (BlInsets left: 20);
addChild: (BrLabel new addChild: (BrLabel new
aptitude: BrGlamorousLabelAptitude; aptitude: BrGlamorousLabelAptitude;
text: '@' , (self userFromId:authorId) userName , ' | ' , self created asString; text: '@' , self getUser userName , ' | ' , self created asString;
beSmallSize); beSmallSize);
addChild: anEditor. addChild: anEditor.
buttonsPane := BrHorizontalPane new buttonsPane := BrHorizontalPane new
@ -42,7 +42,7 @@ asCardElement
hMatchParent; hMatchParent;
vFitContent; vFitContent;
addChildren: { addChildren: {
((self userFromId: authorId) profileImage asElement asScalableElement size: 64 @ 64). (self getUser profileImage asElement asScalableElement size: 64 @ 64).
BrVerticalPane new BrVerticalPane new
cellSpacing: 5; cellSpacing: 5;
hMatchParent; hMatchParent;

View File

@ -1,3 +1,3 @@
accessing accessing
created created
^ created ifNotNil: [ ^ ZTimestamp fromString: created ] ^ created ifNotNil: [ ^ DateAndTime fromString: ((created splitOn: $,) second withoutSuffix: 'GMT') ]

View File

@ -0,0 +1,5 @@
accessing
getUser
self user
ifNotNil: [ ^ self user ].
^ self userFromId: authorId

View File

@ -1,3 +1,3 @@
accessing accessing
userFromId: userId userFromId: userId
^TwitterUser stored detect: [ :each | each id = userId asInteger ] ^ TwitterUser stored detect: [ :each | each id = userId asInteger ]