#include "toggle_pause.hpp" #include #include TogglePauseCommand::TogglePauseCommand( std::shared_ptr generation_tracker, std::shared_ptr status_manager) noexcept : _generation_tracker(std::move(generation_tracker)), _status_manager(std::move(status_manager)) { } void TogglePauseCommand::execute() noexcept { auto onoff = !_generation_tracker->get_is_paused(); _generation_tracker->set_is_paused(onoff); _status_manager->set_section_body(StatusLineSection::D, onoff ? "yes" : "no"); }