## Ticket
1074
In mobile, the second livestream tile in Following gets missing because of the Ad being in 'replace' mode.
## Change
Switch from 'replace' to 'insert' mode in Mobile layout.
If missing (replaced) tiles is not a desired behavior, the true fix would be to always use 'insert' mode, and either live with the uneven tiles or wait for our design master's solution.
It was meant to be general-purpose in the first-place, but ended being tied to ads due to time constraint and also bad documentation.
No functional change.
## Issue
1345
## Change
The refactor in 04c5ac46 broke the logic, because `!hasCost` would incorrectly include an undefined `costInfo` (haven't fetched) as free content.
## Issue
??
## Behavioral Changes
- Use `claim_search` instead of `claim_list` to retrieve all all own claims with the same name (case-insensitive).
- Caveat: annonymous posts will be excluded.
- When a clash occurs, there is a possibility that we have multiple existing entries (e.g. "xxX", "xXx"). Since we don't know which one is best to fall back, I removed the "edit" button for this and replaced with a simpler text
## Code Note
- If not mistaken, the rest of the code still needs `selectMyClaimForUri` to be case-sensitive, so augment the selector to support both through an optional parameter.
Ticket: 1318
Had to create v2 as there is no backward-compatible location in the v1 json to place it.
v2 allows any future expansion beyond 'categories' and 'meme'.
One-meme-per-homepage is also supported, but not enabled for now.
As of this commit, only the Channel Page is fetching the data through the new API, which has the viewer count correctly populated.
For both "0" and "undefined", continue to show as "LIVE".
The code currently supports both the baked-in homepages, as well as fetching from `/$/api/content/v1/get`.
As the latter is currently a circular round-trip, just use the baked-in version until the service is moved elsewhere. Loading performance will be better.
The fn version was only needed for Search Page, and that was making it hard to move the metadata to the homepage repo.
Revert back to original, then handle Search separately.
Just like ClaimListDiscover, stop `claim_search`-ing if the result is a failure (null).
Leaving the placeholder tiles as is for now. Can show the timed out message like ClaimListDiscover -- just toggle SHOW_TIMEOUT_MSG.
Potentially closes 1319
## Note
- `persistor.purge` returns a promise, we should wait for the resolved results before reloading, instead of just adding an arbitrary `setTimeout`.
- Perhaps the `setTimeout` method is to ignore a super-long or hanged purge (not sure), but it wouldn't be right since it would end up in a limbo state.
- Log errors to get clues for future.
- Reduced code by moving the reload to `finally`.