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
At the moment we fetch the bookmarks from the Chrome API once and we store in the localstorage. Now, this has to be enhanced for the following reasons
The order of the bookmarks will not reflect folders that you bookmarked to recently as it will only remember the order from the first query
When a user adds a new bookmark folder he might not see it
Possible Solutions
Maybe we can just fetch all the folder when the user activates booklight (performance ?)
Add listeners so that when a user adds a new folder it will fetch a new version. Now, this can be done in a nice way if he adds a folder through our interface. I predict some issues handling messaging between background page and normal extension if we want to listen to folder add from somewhere else
In the case of just bookmarking (no new folders), how about checking if we can update the timestamp associated with the dateGroupModified in the localstorage ?
The text was updated successfully, but these errors were encountered:
For just bookmarking (no new folders), I would add the following to the chrome message listener.
Find the index of the element in booklight.foldersList matching the given request.folder
If found, remove it from the array. folderElem = booklight.foldersList.splice(index, 1);
And add it back to the beginning of the array. booklight.foldersList.unshift(folderElem);
I don't need to update the dateGroupModified as I don't sort by date.
The difficulty with new folders is adding them to the fuzzy search, and fuse.js docs don't list a public api method to do that.
I'd suggest the following...
If step 1 above returns nothing, then reload the list.
Of course, all this breaks down somewhat if someone adds a bookmark from elsewhere, but I think we can assume that if people have this extension, then they will mostly use it.
At the moment we fetch the bookmarks from the Chrome API once and we store in the localstorage. Now, this has to be enhanced for the following reasons
Possible Solutions
dateGroupModified
in the localstorage ?The text was updated successfully, but these errors were encountered: