2022-04-11 15:05:21 +00:00
|
|
|
accessing
|
|
|
|
getLocalMessages
|
|
|
|
"TO DO! This method should return messages from the local database"
|
2022-04-14 22:40:41 +00:00
|
|
|
| allTweets myTweets tweetsWithAntecesor |
|
2022-04-13 02:58:51 +00:00
|
|
|
|
2022-04-14 21:43:31 +00:00
|
|
|
TweetsCollection storeDB.
|
2022-04-13 02:58:51 +00:00
|
|
|
allTweets := Tweet storedInstances asOrderedCollection.
|
|
|
|
allTweets ifNil: [ ^ nil ].
|
|
|
|
myTweets := TweetsCollection new.
|
2022-04-14 22:40:41 +00:00
|
|
|
tweetsWithAntecesor := allTweets select: [ :each | each timelines isNotEmpty and: [ each timelines keys first = self userName ]].
|
|
|
|
myTweets messages: tweetsWithAntecesor.
|
|
|
|
self messages: myTweets.
|
|
|
|
^ self messages
|
2022-04-13 02:58:51 +00:00
|
|
|
|