Initial methods for tweets histogram.
This commit is contained in:
parent
d61490e96c
commit
0da5c06527
@ -0,0 +1,8 @@
|
|||||||
|
accessing
|
||||||
|
belongsToSegment: segmentBodersCollection
|
||||||
|
|
||||||
|
segmentBodersCollection allButLast keysAndValuesDo: [ :i :elem |
|
||||||
|
(elem < self created and: [ self created <= (segmentBodersCollection at: i + 1) ])
|
||||||
|
ifTrue: [ ^ i ]
|
||||||
|
].
|
||||||
|
^ false
|
@ -1,3 +1,3 @@
|
|||||||
accessing
|
accessing
|
||||||
created
|
created
|
||||||
^ created
|
^ created ifNotNil: [ ^ ZTimestamp fromString: created ]
|
@ -1,3 +1,3 @@
|
|||||||
accessing
|
accessing
|
||||||
messages: aTweetsCollection
|
messages: aTweetsCollection
|
||||||
^ tweets := aTweetsCollection
|
^ messages := aTweetsCollection
|
@ -1,3 +1,3 @@
|
|||||||
accessing
|
accessing
|
||||||
messages
|
messages
|
||||||
^ tweets ifNil: [ tweets := OrderedCollection new]
|
^ messages ifNil: [ messages := OrderedCollection new ]
|
@ -1,7 +1,7 @@
|
|||||||
accessing
|
accessing
|
||||||
newest
|
newest
|
||||||
self messages ifNil: [ ^ nil ].
|
self messages ifNil: [ ^ nil ].
|
||||||
self messages ifNilEmpty: [ ^ nil ].
|
self messages ifEmpty: [ ^ nil ].
|
||||||
self pinned created > self messages second created
|
self pinned created > self messages second created
|
||||||
ifTrue: [ ^ self pinned ]
|
ifTrue: [ ^ self pinned ]
|
||||||
ifFalse: [ ^ self messages second ]
|
ifFalse: [ ^ self messages second ]
|
@ -0,0 +1,8 @@
|
|||||||
|
accessing
|
||||||
|
pinned
|
||||||
|
| first second |
|
||||||
|
first := self messages first.
|
||||||
|
(first metadata at: 'pinned') = 1
|
||||||
|
ifFalse: [ ^ first ].
|
||||||
|
second := self messages second.
|
||||||
|
^ first created
|
@ -6,8 +6,8 @@
|
|||||||
"pools" : [ ],
|
"pools" : [ ],
|
||||||
"classvars" : [ ],
|
"classvars" : [ ],
|
||||||
"instvars" : [
|
"instvars" : [
|
||||||
"tweets",
|
"query",
|
||||||
"query"
|
"messages"
|
||||||
],
|
],
|
||||||
"name" : "TweetsCollection",
|
"name" : "TweetsCollection",
|
||||||
"type" : "normal"
|
"type" : "normal"
|
||||||
|
Loading…
Reference in New Issue
Block a user