Let the presenter resume a paused poll with the pause button
CI / Deploy / test (push) Successful in 1m0s
CI / Deploy / deploy (push) Skipped

The pause button was hidden while paused, so only the arrow keys could
continue. It now toggles between pause and resume (also via P), using an
explicit idempotent `resume` control action so double clicks never
pause again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Opus 5.5 committed 2026-11-09 10:51:13 +01:00
1 parent 6912d045cf
commit 430a18865d
5 files changed
+52 -9

No files matched your search

+7 -1
View File
@@ -194,7 +194,7 @@ class AdminController extends AdminAppController
/**
* Presenter controls. Field `action`:
* goto (+ slide_id), next, prev, stop (pause), and the slide actions of
* goto (+ slide_id), next, prev, stop (pause), resume (continue after a pause), and the slide actions of
* SlideControlService (open, close, toggle, stage, question).
*
* On a Q&A slide that is being discussed, next/prev step through the questions
@@ -247,6 +247,12 @@ class AdminController extends AdminAppController
case 'stop':
$this->poll->pause();
break;
case 'resume':
// Explicit (not a toggle), so a repeated click never pauses again.
if ($index === false && in_array($this->poll->paused_slide_id, $ids, true)) {
$this->poll->showSlide((int)$this->poll->paused_slide_id);
}
break;
default:
if (!in_array($action, SlideControlService::ACTIONS, true)) {
throw new BadRequestException('Unknown action');