diff options
author | HampusM <hampus@hampusmat.com> | 2022-05-22 23:13:29 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:59 +0200 |
commit | b74611d2b20fc071b8a699f2ce25e61f60118d6e (patch) | |
tree | 55d4dbf727724f7f527f2acebea83abd34317329 /src/commands/toggle_pause.cpp | |
parent | b1183c712d94d38f75068bd62df006f73bd3550f (diff) |
refactor: improve input handling & remove commands
Diffstat (limited to 'src/commands/toggle_pause.cpp')
-rw-r--r-- | src/commands/toggle_pause.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/commands/toggle_pause.cpp b/src/commands/toggle_pause.cpp deleted file mode 100644 index 852e093..0000000 --- a/src/commands/toggle_pause.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include "toggle_pause.hpp" - -#include <fmt/core.h> -#include <utility> - -TogglePauseCommand::TogglePauseCommand( - std::shared_ptr<IGenerationTracker> generation_tracker, - std::shared_ptr<IStatusManager> 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"); -} |