Merge pull request 'Let the presenter resume a paused poll with the pause button' (#38) from fix/presenter-resume into main
CI / Deploy / test (push) Successful in 57s
CI / Deploy / deploy (push) Successful in 8s

Reviewed-on: #38
This commit was merged in pull request #38.
This commit is contained in:
gnilebein committed 2026-11-09 10:51:57 +01:00
commit e9e1159ad9
5 files changed
+52 -9

No files matched your search

+7 -1
View File
@@ -188,7 +188,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
@@ -241,6 +241,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');