diff --git a/web/src/features/home/HomeView.vue b/web/src/features/home/HomeView.vue index 66653e9..a58ae87 100644 --- a/web/src/features/home/HomeView.vue +++ b/web/src/features/home/HomeView.vue @@ -259,6 +259,9 @@ async function loadSummary() { if (!hadData) summaryState.value = "error"; return; } + const studying = studyControl.value.active || studyControl.value.started; + if (studying && progressHours.value) parsed.month_hours = progressHours.value; + else if (parsed.month_hours) progressHours.value = parsed.month_hours; summary.value = parsed; avatarBroken.value = false; summaryError.value = ""; @@ -560,7 +563,8 @@ function applyStudyControl(payload: Record) { message: typeof payload.message === "string" ? payload.message : "", workers: asWorkers(payload.workers), }; - if (typeof payload.month_hours === "string") { + const studying = payload.active === true || payload.started === true; + if (studying && typeof payload.month_hours === "string" && payload.month_hours) { progressHours.value = payload.month_hours; if (summary.value) summary.value = { ...summary.value, month_hours: payload.month_hours }; }