mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 05:05:38 -04:00
Merge watchlist and watching into a single "Watching" status
The distinction between "Watchlist" and "Watching" added no value — the progress bar already shows whether you've started. Now there are just two visible states: Watching (amber) and Completed (green). Adding a show via "+ Watchlist" now sets in_progress directly, and both the old watchlist and in_progress DB values render as "Watching" for backward compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -24,7 +24,7 @@ async function getSessionUserId() {
|
||||
|
||||
export async function updateTitleStatus(
|
||||
titleId: string,
|
||||
status: "watchlist" | null,
|
||||
status: "in_progress" | null,
|
||||
) {
|
||||
const userId = await getSessionUserId();
|
||||
if (status === null) {
|
||||
|
||||
@@ -84,17 +84,10 @@ export function TitleInteractionProvider({
|
||||
const handleStatusChange = useCallback(
|
||||
async (status: string | null) => {
|
||||
const prev = userStatus;
|
||||
setUserStatus(status);
|
||||
setUserStatus(status === "watchlist" ? "in_progress" : status);
|
||||
try {
|
||||
await updateTitleStatus(
|
||||
titleId,
|
||||
status === "watchlist" ? "watchlist" : null,
|
||||
);
|
||||
toast.success(
|
||||
status === "watchlist"
|
||||
? "Added to watchlist"
|
||||
: "Removed from library",
|
||||
);
|
||||
await updateTitleStatus(titleId, status ? "in_progress" : null);
|
||||
toast.success(status ? "Added to watchlist" : "Removed from library");
|
||||
} catch {
|
||||
setUserStatus(prev);
|
||||
toast.error("Failed to update status");
|
||||
|
||||
Reference in New Issue
Block a user