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
getLocalMessages
"TO DO! This method should return messages from the local database"
| allTweets myTweets tweetsWithAntecesor |
TweetsCollection storeDB.

View File

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