Spliting between local and remote messages. Minor UI improvements.
This commit is contained in:
parent
2c2ee3b132
commit
89a73603a3
@ -0,0 +1,4 @@
|
|||||||
|
accessing
|
||||||
|
getLocalMessages
|
||||||
|
"TO DO! This method should return messages from the local database"
|
||||||
|
^ nil
|
@ -1,24 +1,4 @@
|
|||||||
accessing
|
accessing
|
||||||
getMessages
|
getMessages
|
||||||
| lastTweetsRaw customQuery lastTweets |
|
self getLocalMessages ifNil: [ self getRemoteMessages ].
|
||||||
lastTweetsRaw := self rssFeed xmlDocument xpath: '//item'.
|
|
||||||
lastTweets := TweetsCollection new.
|
|
||||||
customQuery := Dictionary new
|
|
||||||
at: 'parameters' put: self userNameLink;
|
|
||||||
at: 'date' put: DateAndTime now;
|
|
||||||
yourself.
|
|
||||||
lastTweets query: customQuery.
|
|
||||||
lastTweetsRaw doWithIndex: [ :rssTweet :i | | current previous |
|
|
||||||
current := Tweet new fromNitterRssItem: rssTweet.
|
|
||||||
i < lastTweetsRaw size ifTrue: [
|
|
||||||
previous := Tweet new fromNitterRssItem: (lastTweetsRaw at: i + 1).
|
|
||||||
current timelines
|
|
||||||
at: self userName put: previous id;
|
|
||||||
yourself.
|
|
||||||
].
|
|
||||||
current queries add: customQuery.
|
|
||||||
lastTweets add: current.
|
|
||||||
].
|
|
||||||
self tweets: lastTweets.
|
|
||||||
^ self tweets
|
^ self tweets
|
||||||
|
|
@ -0,0 +1,22 @@
|
|||||||
|
accessing
|
||||||
|
getRemoteMessages
|
||||||
|
|
||||||
|
| customQuery lastTweetsRaw lastTweets |
|
||||||
|
lastTweetsRaw := self rssFeed xmlDocument xpath: '//item'.
|
||||||
|
lastTweets := TweetsCollection new.
|
||||||
|
customQuery := Dictionary new
|
||||||
|
at: 'parameters' put: self userNameLink;
|
||||||
|
at: 'date' put: DateAndTime now;
|
||||||
|
yourself.
|
||||||
|
lastTweets query: customQuery.
|
||||||
|
lastTweetsRaw doWithIndex: [ :rssTweet :i |
|
||||||
|
| current previous |
|
||||||
|
current := Tweet new fromNitterRssItem: rssTweet.
|
||||||
|
i < lastTweetsRaw size ifTrue: [
|
||||||
|
previous := Tweet new fromNitterRssItem: (lastTweetsRaw at: i + 1).
|
||||||
|
current timelines
|
||||||
|
at: self userName put: previous id;
|
||||||
|
yourself ].
|
||||||
|
current queries add: customQuery.
|
||||||
|
lastTweets add: current ].
|
||||||
|
self tweets: lastTweets
|
@ -17,7 +17,7 @@ gtTweetsFor: aView
|
|||||||
background: Color white;
|
background: Color white;
|
||||||
margin: (BlInsets all: 10);
|
margin: (BlInsets all: 10);
|
||||||
constraintsDo: [ :c |
|
constraintsDo: [ :c |
|
||||||
c vertical exact: 275.
|
c vertical exact: 200.
|
||||||
c horizontal exact: 480 ];
|
c horizontal exact: 480 ];
|
||||||
stencil: [ each asCardElement margin: (BlInsets all: 15) ].
|
stencil: [ each asCardElement margin: (BlInsets all: 15) ].
|
||||||
container addChild: imageContainer
|
container addChild: imageContainer
|
||||||
|
Loading…
Reference in New Issue
Block a user