Fixing tweets rendeting by loading local users from DB.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-04-16 19:53:33 -05:00
parent 50a3ef901b
commit ee9050a9b9
4 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,6 @@
accessing accessing
getLocalMessages getLocalMessages
"TO DO! This method should return messages from the local database"
| allTweets myTweets tweetsWithAntecesor | | allTweets myTweets tweetsWithAntecesor |
TweetsCollection storeDB. TweetsCollection storeDB.

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 user userName , ' | ' , self created asString; text: '@' , (self userFromId:authorId) 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 user profileImage asElement asScalableElement size: 64 @ 64). ((self userFromId: authorId) profileImage asElement asScalableElement size: 64 @ 64).
BrVerticalPane new BrVerticalPane new
cellSpacing: 5; cellSpacing: 5;
hMatchParent; hMatchParent;

View File

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

View File

@ -0,0 +1,3 @@
accessing
stored
^ self storedInstances asOrderedCollection