fix(flow): 기획-구현 불일치 정렬
This commit is contained in:
@@ -63,6 +63,7 @@ export const SpaceFocusHudWidget = ({
|
||||
const visibleRef = useRef(false);
|
||||
const resumePlaybackStateRef = useRef<'running' | 'paused'>(playbackState);
|
||||
const pausePlaybackStateRef = useRef<'running' | 'paused'>(playbackState);
|
||||
const suppressNextPausePromptRef = useRef(false);
|
||||
const restReminderTimerRef = useRef<number | null>(null);
|
||||
const normalizedGoal = goal.trim().length > 0 ? goal.trim() : copy.space.focusHud.goalFallback;
|
||||
const normalizedMicroStep = microStep?.trim() ? microStep.trim() : null;
|
||||
@@ -147,6 +148,12 @@ export const SpaceFocusHudWidget = ({
|
||||
hasActiveSession &&
|
||||
overlay === 'none'
|
||||
) {
|
||||
if (suppressNextPausePromptRef.current) {
|
||||
suppressNextPausePromptRef.current = false;
|
||||
pausePlaybackStateRef.current = playbackState;
|
||||
return;
|
||||
}
|
||||
|
||||
setIntentError(null);
|
||||
setOverlay('paused');
|
||||
onStatusMessage({
|
||||
@@ -292,7 +299,6 @@ export const SpaceFocusHudWidget = ({
|
||||
}}
|
||||
onRest={() => {
|
||||
handleDismissReturnPrompt();
|
||||
onStatusMessage({ message: copy.space.focusHud.restReminder });
|
||||
}}
|
||||
onNextGoal={() => {
|
||||
handleDismissReturnPrompt();
|
||||
@@ -352,6 +358,8 @@ export const SpaceFocusHudWidget = ({
|
||||
onFinish={() => Promise.resolve(onGoalFinish())}
|
||||
onRest={() => {
|
||||
setOverlay('none');
|
||||
suppressNextPausePromptRef.current = true;
|
||||
onPauseRequested?.();
|
||||
|
||||
if (restReminderTimerRef.current) {
|
||||
window.clearTimeout(restReminderTimerRef.current);
|
||||
|
||||
Reference in New Issue
Block a user