Improving creation date processing/transfomation from different formats. #retrieveContents should also load local messages.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-04-18 18:36:52 -05:00
parent 8d87ee3ed7
commit e98fd45083
5 changed files with 9 additions and 5 deletions

View File

@ -10,5 +10,5 @@ getLocalMessages
tweetsWithAntecesor := allTweets select: [ :each | each timelines isNotEmpty and: [ each timelines keys first = self userName ]].
myTweets messages: tweetsWithAntecesor.
self messages: myTweets.
^ self messages
^ self

View File

@ -1,6 +1,7 @@
accessing
retrieveContents
self userName ifNil: [^ self].
" self retrieveLocalContents ifNotNil: [ ^ self ]."
^ self
id;
name;

View File

@ -1,3 +1,6 @@
accessing
retrieveLocalContents
^ self class stored detect: [ :each | each userName = self userName ]
| profileTemp |
profileTemp := self class stored detect: [ :each | each userName = self userName ].
profileTemp getLocalMessages.
^ profileTemp

View File

@ -1,5 +1,5 @@
accessing
created
created class = DateAndTime ifTrue: [ ^ created ].
^ (created endsWith: 'GMT') ifTrue: [ ^ DateAndTime fromString: ((created splitOn: $,) second withoutSuffix: 'GMT') ].
"^ DateAndTime fromString: created"
^ (created endsWith: 'GMT')
ifTrue: [ ^ DateAndTime fromString: ((created splitOn: $,) second withoutSuffix: 'GMT') ] ifFalse: [ ^ DateAndTime fromString: created ].

View File

@ -41,7 +41,7 @@ asCardElement
BrButton new
aptitude: BrGlamorousButtonWithLabelAptitude new;
label: 'Tweets';
action: [ :e | e phlow spawnObject: self getMessages ].
action: [ :e | e phlow spawnObject: self messages ].
BrButton new
aptitude: BrGlamorousButtonWithLabelAptitude new;
label: 'Web view';