fix: review round 2 — Clear watch progress clears only the resume point, big view focus by the way it arrived, dialog name, reason tooltip, backfill locks
This commit is contained in:
@@ -7,7 +7,7 @@ import { markVideo } from "../../lib/progressCache";
|
||||
// once it has the change — into the lists that are never refetched (`markVideo`: every related
|
||||
// list, every live search). These are the ONE way to make those writes, and
|
||||
// `videoWrites.contract.test.ts` holds it: four writes that called the api directly (the
|
||||
// Notification Center's undo, the feed's reset, the feed's and Home's Watch-later toggles) left a
|
||||
// Notification Center's undo, the feed's clear, the feed's and Home's Watch-later toggles) left a
|
||||
// related list hiding a video the user had un-hidden, or showing it unsaved after a save. A
|
||||
// playlist item is one of them because the built-in Watch later list IS the mark (`saved`): ticked
|
||||
// in Add to playlist or taken out on the Playlists page, it left the bookmark as it was. Each
|
||||
@@ -20,10 +20,10 @@ export function writeVideoState(qc: QueryClient, id: string, status: VideoStatus
|
||||
});
|
||||
}
|
||||
|
||||
/** Back to pristine: the state row and its resume position both go. */
|
||||
export function resetVideoState(qc: QueryClient, id: string) {
|
||||
return api.clearState(id).then((r) => {
|
||||
markVideo(qc, id, { status: "new", position_seconds: 0 });
|
||||
/** Forget where the user left it: the resume point goes, the status stays. */
|
||||
export function clearVideoProgress(qc: QueryClient, id: string) {
|
||||
return api.clearProgress(id).then((r) => {
|
||||
markVideo(qc, id, { position_seconds: 0 });
|
||||
return r;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user