#pragma once // Spec: FR-CLI-02 (screen id comment-editor), INV-posts 5.3. Standalone host for one CommentEditor, used by // `--screen comment-editor` and the smoke scripts: the editor on the post background with the mock participants. #include #include "screens/comments/CommentsSession.hpp" #include "ui/Navigation.hpp" namespace dp { class CommentEditorScreen : public ui::Screen { public: CommentEditorScreen(); ui::ViewPtr body() override; std::string title() const override { return "Comment editor"; } TitleMode titleMode() const override { return TitleMode::Inline; } // Text of the editor and the last submitted text (observable by tests). const std::string& text() const { return text_; } const std::string& submitted() const { return submitted_; } private: CommentsSession session_; std::string text_; std::string submitted_; bool cancelled_ = false; }; } // namespace dp