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 ]]. tweetsWithAntecesor := allTweets select: [ :each | each timelines isNotEmpty and: [ each timelines keys first = self userName ]].
myTweets messages: tweetsWithAntecesor. myTweets messages: tweetsWithAntecesor.
self messages: myTweets. self messages: myTweets.
^ self messages ^ self

View File

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

View File

@ -1,3 +1,6 @@
accessing accessing
retrieveLocalContents 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 accessing
created created
created class = DateAndTime ifTrue: [ ^ created ]. created class = DateAndTime ifTrue: [ ^ created ].
^ (created endsWith: 'GMT') ifTrue: [ ^ DateAndTime fromString: ((created splitOn: $,) second withoutSuffix: 'GMT') ]. ^ (created endsWith: 'GMT')
"^ DateAndTime fromString: created" ifTrue: [ ^ DateAndTime fromString: ((created splitOn: $,) second withoutSuffix: 'GMT') ] ifFalse: [ ^ DateAndTime fromString: created ].

View File

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