channels
channels copied to clipboard
Active video listed like/dislike count(s) are incorrect
- [x] I am on the latest Channels version.
- [x] I have searched the issues of this repo and believe that this is not a duplicate.
- Channels version: 0.1.0
- OS version and name: 10.12.6 macOS
- Electron version: 1.8.1
Issue
This only applies to the active video when its rating has been changed.
Reproduce:
- Select a video
- Rate the video
- Select a different video
- Return to the initial video
The counts listed will be those prior to the most recent rating. This happens because when rating a video the activeVideo
object in the store is updated, but the lookup table that exists on the videos
object in the store isn't updated and it's that lookup table that updates the activeVideo
object on video change.
For those who may be unfamiliar with the term, lookup table, I'm referencing state.videos.byId
. I first heard this term from, Dan Abramov, and I quite like it.