You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I patched together a fix in my code, sharing here.
In \src\zuck.js make changes to reflect accordingly in \dist\zuck.js (webpack)
Underneath /* api */ zuck.data = option('stories') || {};
I created an array containing id of stories that have set key seen: true const seenStoryIdsArr = zuck.data.filter(function(obj){ return obj.seen == true }).map(function(story){ return story.id; });
This I then pass the array variable as a second argument to function getLocalData wherever it is called, such as zuck.internalData.seenItems = getLocalData('seenItems', seenStoryIdsArr) || {};
This function I then define as const getLocalData = function (key, seenStoryIdsArr) { if (option('localStorage')) { const keyName = zuck-${id}-${key}`;
Hello Ramon, fantastic little library you've made here. Thanks :)
I think 've encountered a bug.
As documented in stories structure,
there is a key (seen: false, // set true if user has opened)
When in array of stories I put seen: true for one out of 5 stories (say for id="ramon").
I expect its ring to discolor & the story to go last.
Outcome observed: Story does go to last but the ring is not discolored as class "seen" is not added.
The text was updated successfully, but these errors were encountered: