Changing profileImageUrl definition to ease ReStore serialization. Tip: Maybe derived keys can be used to serialize url as Strings in SQLite.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-04-08 11:10:24 -05:00
parent 6a60f4f13f
commit ba05b8d0bb
2 changed files with 2 additions and 2 deletions

View File

@ -1,3 +1,3 @@
accessing
id
^ id ifNil: [id := (self profileImageUrl segments select: [ :each | each asInteger class = LargePositiveInteger]) first.]
^ id ifNil: [id := (self profileImageUrl asUrl segments select: [ :each | each isAllDigits ]) first.]

View File

@ -1,4 +1,4 @@
accessing
profileImageUrl
^ profileImageUrl ifNil: [
profileImageUrl := ((self rssFeed xmlDocument xpath: '//image/url') stringValue copyReplaceAll: '%2F' with: '/') asUrl ]
profileImageUrl := ((self rssFeed xmlDocument xpath: '//image/url') stringValue copyReplaceAll: '%2F' with: '/') ]