Modifying newest tweet selection.
This commit is contained in:
parent
35d9d037d3
commit
a08073232d
@ -0,0 +1,4 @@
|
|||||||
|
accessing
|
||||||
|
newestTweet
|
||||||
|
|
||||||
|
^ self messages newestOf: self id
|
@ -0,0 +1,7 @@
|
|||||||
|
accessing
|
||||||
|
newestOf: userId
|
||||||
|
|
||||||
|
self messages ifNil: [ ^ nil ].
|
||||||
|
self messages ifEmpty: [ ^ nil ].
|
||||||
|
^ ((self select: [ :tweet | tweet authorId = userId ])
|
||||||
|
select: [ :tweet | tweet created = (((self select: [ :each | each authorId = userId ]) collect: [ :each | each created ]) asSortedCollection last)]) first
|
Loading…
Reference in New Issue
Block a user