Make publishes appear immediately in My Files #14
No reviewers
Labels
No labels
accessibility
app-parity
area: creator
area: daemon
area: design
area: devops
area: discovery
area: docs
area: installer
area: internal
area: livestream
area: performance
area: proposal
area: reposts
area: rewards
area: search
area: security
area: subscriptions
area: sync
area: ux
area: viewer
area: wallet
BEAMER
channel
comments
community PR
consider soon
core team
css
dependencies
electron
Epic
feature request
first-timers-only
good first issue
hacktoberfest
help wanted
hub-dependent
icebox
Invalid
level: 0
level: 1
level: 2
level: 3
level: 4
merge when green
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
notifications
odysee
on hold
playlists
priority: blocker
priority: high
priority: low
priority: medium
protocol dependent
recsys
redesign
regression
resilience
sdk dependent
Tom's Wishlist
trending
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbry-desktop#14
Loading…
Reference in a new issue
No description provided.
Delete branch "publish-cache"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Uses a client side cache to simulate entries in the file manager and claims list.
Also adds new utility functions for using Local Storage.
Possibly break these out into their own module?
Also, I know this is the first time we've tried exporting functions at the top level instead of using object literals. I like the brevity, especially with long function names like this, (
utils.savePendingPublish
seems really long) but I'm not married to it.I don't love "pending publish" as the name for this data structure, kinda wordy. But what else to call it? Publish stub? Dummy publish?
These functions should probably be moved/kept with the LBRY API logic?
@ -0,0 +1,15 @@
/**
Should all these functions actually be in the global namespace?
Before, we were talking about aiming to make the lbry module only have API wrapper functions, not random utility functions and such. We could still put helper functions like this as private functions that are not exported, though.
The main reason I didn't do that is that I felt like lbry.js is already way too big. But it's going to shrink over time, so I guess it's OK.
I know it's awkward to use Local Storage for queryable, list-like data like this. The main alternatives would be IndexedDB (too complicated without a wrapper), Sqlite (possibly too complicated and would require using IPC to do stuff in the main process), or a light JS key/value database like nedb (adds a dependency and stuff to learn).
If local storage isn't cool, it would be fairly quick to switch to something like nedb.
@ -0,0 +1,15 @@
/**
In ES6 it defaults to module namespace. That might be an issue if we don't like the calling style (
getLocal()
vsutils.getLocal()
) but it's not going to pollute scope anywhere we don't want it to.The name is fine, probably more important to make it some kind of const if referenced in multiple places.
I think lbry is the right place for this. They change the behavior of API calls provided by lbry.js.
Local storage is fine.
@alexliebowitz you can merge this when ready
@alexliebowitz let's get this out!