From 104fe9e348d11d09337690b6b9b33a5449037be9 Mon Sep 17 00:00:00 2001 From: ruidajo Date: Thu, 28 Apr 2022 16:17:56 -0500 Subject: [PATCH] Fixing method for geting oldest tweets, modifying store avoiding duplication. --- .../instance/getPagesContentsFromOldestUpto..st | 2 +- .../TweetsCollection.class/instance/store.st | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Socialmetrica.package/NitterUser.class/instance/getPagesContentsFromOldestUpto..st b/Socialmetrica.package/NitterUser.class/instance/getPagesContentsFromOldestUpto..st index 448b940..91f1d46 100644 --- a/Socialmetrica.package/NitterUser.class/instance/getPagesContentsFromOldestUpto..st +++ b/Socialmetrica.package/NitterUser.class/instance/getPagesContentsFromOldestUpto..st @@ -1,4 +1,4 @@ accessing getPagesContentsFromOldestUpto: anInteger - ^ self getPagesContentsFrom: ((self messages oldest metadata select: [ :item | item beginsWith: 'https://' ]) values first) Upto: anInteger \ No newline at end of file + ^ self getPagesContentsFrom: ((self messages oldest metadata select: [ :item | item isString and: [ item beginsWith: 'https://' ]]) values first) Upto: anInteger \ No newline at end of file diff --git a/Socialmetrica.package/TweetsCollection.class/instance/store.st b/Socialmetrica.package/TweetsCollection.class/instance/store.st index f9922a4..9bb8f42 100644 --- a/Socialmetrica.package/TweetsCollection.class/instance/store.st +++ b/Socialmetrica.package/TweetsCollection.class/instance/store.st @@ -1,8 +1,8 @@ accessing store ReStore isConnected ifFalse: [ self class storeDB ]. "Starting the ReStore singleton." - self messages do: [ :each | ReStore evaluateAsTransaction: [ - each store. + self messages do: [ :each | ReStore evaluateAsTransaction: [ + each isInDB ifFalse: [ each store ]. each user isInDB ifFalse: [ each user store ] ] ]. \ No newline at end of file