Requires a related commit from the homepages repo.
## Changes
- Add ability to reset the sort order.
- Make 'News' and 'Wild West' a "hideByDefault" category. It can be made visible in the homepage from the customization dialog.
## Ticket
1572
Always check for availability before use.
## Changes
- Consolidated the keys into one place for easier tracking.
- It'll also be easier to code using constant autocomplete.
- Cleaned up the wrapper to be as close as the original.
- Updated existing code to use the wrapper (even if they already handled the availability) to encourage future code to just use the wrapper.
## Issue
- Closes "1535 bunch of channels (from featured?) resolved on page load"
- It was due to the use of reposts in the Category. As we did not store the repost's original channel claim, `ChannelThumbnail` couldn't find the author and requested a separate `resolve`.
## Change
Store the repost's original channel claim as well.
## Issue
Contents aren't block if you own them, but need to tell creator that is it blocked for others.
## Change
- Show a banner on Content and Channel Page for this scenario.
- Hover tooltip is available for the full text. For mobile, tapping it reveals the message.
Note that this only applies to the locale from where the creator is viewing it from. We can ignore locale, but would then need to display _all_ geo-restrictions related to the content in a list.
- Add ability to store `entries` into Redux.
- Sync to redux in the same interval as when playing position is saved (re-use timer).
- On startup, send any stashed entries and clear them.
Per 1318, we will only be sending data when user is done with a content, so this listener is no longer needed.
I think it was also not needed when we removed the beacon usage (it's mostly to prevent data loss when beacon is used), but we didn't remove it back then to avoid changing too many things and affecting the dataset.
* Show-page: split out some effects
Break apart the large effect for easier tweaking, abiding by the 1-action-per-effect guideline.
This also fixes the dependency list. After checking with Haffa, the exclusion of `pathname` and `hash` from the list is probably to avoid hitting `doResolveUri`. This should no longer be an issue after the split, so no suppression needed.
* Show-page: fix "no content found" flicker
## Issue
1539: "Recently been seeing a flicker of "content not found" when direct loading content or channel links on mobile"
## Cause
`doResolveUri` can only be called after the initial mount (in the effect), so at first render, `isResolvingUri` won't be set yet, so we briefly ended up in the "no content found" path.
## Change
Factor out the logic that determines if we should send `doResolveUri`. This allows us to know that the upcoming effect will be sending `doResolveUri`, so we can hold off displaying "no content found".
* Show-page: don't delay the spinner when resolving
## Reason
The delay causes a blank page + footer, which looks bad.
* Remove claim from channel page when geoblock conditions hits
Ticket: 1100
* Handle geoblocked channel page
## Ticket
1100
## Issue
"If a channel is geoblocked, the entire channel page (even showing titles, etc. would be against the law)"
## Issues
- Not safe to call the parent callback from the render function. It must be called from an effect or
- `onHidden` is only called when blacklisted, but it can also be hidden from other circumstances.
- While those other circumstances doesn't apply for FYP (the first client that relies on `onHidden`, it's incorrect from a code perspective, unless it is renamed to `onBlacklisted`.
## Change
- Move the callback execution into an effect.
- Ensure `onHidden` is for all situations that it is hidden.
Effects cannot be defined after the render function returns early, so it was not possible to add new effects when the derived variables that it depends on are way down below.
1. Hardcoding breaks any image changes done on dev instances or locally.
2. The relative path is bad, and there are few more instances of it. But continue as is for now, will file a ticket to fix this.
3. Fix caching.
- Don't want to show it in Incognito.
- Only show it in when entered from homepage, or in the Help page.
- Record the hash of the viewed announcement and update the wallet with it.
This stores the hash for the last viewed announcement.
The intention is so that the announcement won't re-appear when logging into another device.
However, this does mean that announcements would need to wait until the first sync to decide whether to appear or not, which can be quite a delay.
This requires an accompanying commit in the homepages repo (see "Add announcement support").
Using `raw-loader` to import markdown files as a string works for the app-side, but didn't work well in web-side. Falling back to copying the announcement files to `dist` and reading them via `readFileSync`. Don't really like this -- will return with an alternative.