From ba05b8d0bb775f1d69496a6742098cebff41738c Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Fri, 8 Apr 2022 11:10:24 -0500 Subject: [PATCH 1/2] Changing profileImageUrl definition to ease ReStore serialization. Tip: Maybe derived keys can be used to serialize url as Strings in SQLite. --- Socialmetrica.package/NitterUser.class/instance/id.st | 2 +- .../NitterUser.class/instance/profileImageUrl.st | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Socialmetrica.package/NitterUser.class/instance/id.st b/Socialmetrica.package/NitterUser.class/instance/id.st index 6db6025..7ad7ec6 100644 --- a/Socialmetrica.package/NitterUser.class/instance/id.st +++ b/Socialmetrica.package/NitterUser.class/instance/id.st @@ -1,3 +1,3 @@ accessing id - ^ id ifNil: [id := (self profileImageUrl segments select: [ :each | each asInteger class = LargePositiveInteger]) first.] \ No newline at end of file + ^ id ifNil: [id := (self profileImageUrl asUrl segments select: [ :each | each isAllDigits ]) first.] \ No newline at end of file diff --git a/Socialmetrica.package/NitterUser.class/instance/profileImageUrl.st b/Socialmetrica.package/NitterUser.class/instance/profileImageUrl.st index 7b64f58..304841c 100644 --- a/Socialmetrica.package/NitterUser.class/instance/profileImageUrl.st +++ b/Socialmetrica.package/NitterUser.class/instance/profileImageUrl.st @@ -1,4 +1,4 @@ accessing profileImageUrl ^ profileImageUrl ifNil: [ - profileImageUrl := ((self rssFeed xmlDocument xpath: '//image/url') stringValue copyReplaceAll: '%2F' with: '/') asUrl ] \ No newline at end of file + profileImageUrl := ((self rssFeed xmlDocument xpath: '//image/url') stringValue copyReplaceAll: '%2F' with: '/') ] \ No newline at end of file -- 2.30.2 From 8c9e302fddc255c5a43e606a0a2c6653ddaad410 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Fri, 8 Apr 2022 11:15:04 -0500 Subject: [PATCH 2/2] Fixing conflict. --- Socialmetrica.package/NitterUser.class/instance/id.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Socialmetrica.package/NitterUser.class/instance/id.st b/Socialmetrica.package/NitterUser.class/instance/id.st index 7ad7ec6..ee51d0d 100644 --- a/Socialmetrica.package/NitterUser.class/instance/id.st +++ b/Socialmetrica.package/NitterUser.class/instance/id.st @@ -1,3 +1,3 @@ accessing id - ^ id ifNil: [id := (self profileImageUrl asUrl segments select: [ :each | each isAllDigits ]) first.] \ No newline at end of file + ^ id ifNil: [ id := (self profileImageUrl asUrl segments select: [ :each | each isAllDigits ]) first.] \ No newline at end of file -- 2.30.2