Refactoring for improving display times.
This commit is contained in:
parent
7d77d26691
commit
43662d3fce
@ -2,6 +2,8 @@ accessing
|
|||||||
asDictionary
|
asDictionary
|
||||||
|
|
||||||
| tweets tweetsHistogramData repliesHistogramData quotesHistogramData retweetsHistogramData |
|
| tweets tweetsHistogramData repliesHistogramData quotesHistogramData retweetsHistogramData |
|
||||||
|
[self config at: 'lang']
|
||||||
|
onErrorDo: [ ^ self inform: 'Please put a lang key with a language (for example: en) in the object config.' ].
|
||||||
tweets := self messages.
|
tweets := self messages.
|
||||||
tweetsHistogramData := self tweetsByWeeksTimeSpan.
|
tweetsHistogramData := self tweetsByWeeksTimeSpan.
|
||||||
repliesHistogramData := self repliesByWeeksTimeSpan.
|
repliesHistogramData := self repliesByWeeksTimeSpan.
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
accessing
|
accessing
|
||||||
avatarPicture
|
avatarPicture
|
||||||
| response |
|
| response profileImgFile|
|
||||||
|
profileImgFile := self profileImageFile.
|
||||||
|
profileImgFile exists
|
||||||
|
ifTrue: [ ^ (ImageReadWriter formFromFileNamed: profileImgFile fullName) asElement ].
|
||||||
response := ZnClient new url: (self profileImageUrl); get; response.
|
response := ZnClient new url: (self profileImageUrl); get; response.
|
||||||
response contentType = ZnMimeType imageJpeg
|
response contentType = ZnMimeType imageJpeg
|
||||||
ifTrue: [ ^ (PluginBasedJPEGReadWriter gtFromBuffer: response contents) asElement ].
|
ifTrue: [ ^ (PluginBasedJPEGReadWriter gtFromBuffer: response contents) asElement ].
|
||||||
|
@ -2,6 +2,7 @@ accessing
|
|||||||
messages
|
messages
|
||||||
|
|
||||||
messages ifNil: [ messages := TweetsCollection new ].
|
messages ifNil: [ messages := TweetsCollection new ].
|
||||||
|
messages ifEmpty: [ self getLocalMessages ].
|
||||||
messages ifEmpty: [ self getRemoteMessagesFromHtml ].
|
messages ifEmpty: [ self getRemoteMessagesFromHtml ].
|
||||||
[ config at: 'reportingPeriod' ]
|
[ config at: 'reportingPeriod' ]
|
||||||
onErrorDo: [ self config
|
onErrorDo: [ self config
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
accessing
|
||||||
|
correctMetadataUrl
|
||||||
|
self metadata keysAndValuesDo: [ :key :value |
|
||||||
|
(value includesSubstring: '42l.fr')
|
||||||
|
ifTrue: [ self metadata at: key put: (value copyReplaceAll: '42l.fr' with: 'net' )]
|
||||||
|
].
|
||||||
|
^ self
|
@ -0,0 +1,7 @@
|
|||||||
|
accessing
|
||||||
|
updateFromWeb
|
||||||
|
| url webContents |
|
||||||
|
url := (NitterUser nitterProvider, self user userName, '/status/', self id) asUrl.
|
||||||
|
webContents := XMLHTMLParser parse: url retrieveContents.
|
||||||
|
^ Tweet new fromNitterHtmlItem: webContents.
|
||||||
|
|
@ -4,7 +4,9 @@ reStoreDefinition
|
|||||||
"defineAsID: #id;"
|
"defineAsID: #id;"
|
||||||
define: #id as: String;
|
define: #id as: String;
|
||||||
define: #userName as: String;
|
define: #userName as: String;
|
||||||
|
define: #name as: String;
|
||||||
define: #profileImageUrl as: String;
|
define: #profileImageUrl as: String;
|
||||||
define: #profileBio as: String;
|
define: #profileBio as: String;
|
||||||
|
define: #description as: String;
|
||||||
"define: #createdAt as: String;"
|
"define: #createdAt as: String;"
|
||||||
yourself.
|
yourself.
|
@ -0,0 +1,4 @@
|
|||||||
|
accessing
|
||||||
|
profileImageUrl: anUrl
|
||||||
|
|
||||||
|
profileImageUrl := anUrl
|
Loading…
Reference in New Issue
Block a user