15 lines
545 B
Smalltalk
15 lines
545 B
Smalltalk
accessing
|
|
getLocalMessages
|
|
"TO DO! This method should return messages from the local database"
|
|
| allTweets myTweets tempTweets tempUsername |
|
|
|
|
tempUsername := self userName.
|
|
TweetsCollection storeDB.
|
|
allTweets := Tweet storedInstances asOrderedCollection.
|
|
allTweets ifNil: [ ^ nil ].
|
|
myTweets := TweetsCollection new.
|
|
tempTweets := allTweets select: [ :each | each timelines isNotEmpty and: [each timelines keys first = tempUsername] ].
|
|
myTweets tweets: tempTweets.
|
|
self tweets: myTweets.
|
|
^ {self tweets. self userName. tempTweets}
|
|
|