Modifying newest and oldest tweet selection.
This commit is contained in:
parent
75290c2538
commit
f9b7fdf6bb
@ -1,4 +1,4 @@
|
||||
accessing
|
||||
newestTweet
|
||||
|
||||
^ self messages newestOf: self userName
|
||||
^ (self tweets select: [ :tweet | tweet created = ((self tweets collect: [ :each | each created ]) asSortedCollection last)]) first.
|
@ -1,4 +1,4 @@
|
||||
accessing
|
||||
oldestTweet
|
||||
|
||||
^ self messages oldestOf: self userName
|
||||
^ (self tweets select: [ :tweet | tweet created = ((self tweets collect: [ :each | each created ]) asSortedCollection first)]) first.
|
@ -13,8 +13,15 @@ tweets
|
||||
subcollection := self messages
|
||||
select: [ :each | (each authorId = '1502504562984374276') or: [ each authorId = self id ] ]
|
||||
].
|
||||
self userName = 'IBetancourtCol'
|
||||
ifTrue: [
|
||||
subcollection := self messages
|
||||
select: [ :each | (each authorId = '1517487571135344643') or: [ each authorId = self id ] ]
|
||||
].
|
||||
(self userName ~= 'FranciaMarquezM' and: [ self userName ~= 'sandralajas' ])
|
||||
ifTrue: [ subcollection := self messages select: [ :each | each authorId = self id ] ].
|
||||
ifTrue: [ self userName ~= 'IBetancourtCol' ifTrue:
|
||||
[ subcollection := self messages select: [ :each | each authorId = self id ]]
|
||||
].
|
||||
^ TweetsCollection new
|
||||
messages: subcollection;
|
||||
yourself
|
@ -5,5 +5,6 @@ newestOf: userName
|
||||
user := (TwitterUser storedInstances select: [ :each | each userName = userName ]) first.
|
||||
self messages ifNil: [ ^ nil ].
|
||||
self messages ifEmpty: [ ^ nil ].
|
||||
^ ((user messages: self; yourself; tweets)
|
||||
user messages: self.
|
||||
^ ((user tweets)
|
||||
select: [ :tweet | tweet created = ((self collect: [ :each | each created ]) asSortedCollection last)]) first.
|
Loading…
Reference in New Issue
Block a user