// Spec: FR-CLI-02. Screen ids of the posts area: feed, post, report, comment-editor; plus the Routes.hpp factories. #include "app/ScreenRegistry.hpp" #include "screens/Routes.hpp" #include "screens/comments/CommentEditorScreen.hpp" #include "screens/components/ReportScreen.hpp" #include "screens/feed/FeedScreen.hpp" #include "screens/post/PostScreen.hpp" #include "spec/PostsSpec.hpp" namespace dp { ui::ScreenPtr makeFeedScreen() { return std::make_shared(false); } ui::ScreenPtr makePostScreen(PostDestination destination) { return std::make_shared(std::move(destination)); } void registerFeedScreens(ScreenRegistry& r) { // Standalone feed loads its own first page: nothing else does when a single screen is hosted. r.add("feed", [] { return std::make_shared(true); }); r.add("post", [] { return makePostScreen(PostDestination{"a-post-with-several-attachments", std::nullopt}); }); r.add("report", [] { return std::make_shared(ReportViewModel::shared(TargetType::Post, "mock-post")); }, true); r.add("comment-editor", [] { return std::make_shared(); }, true); } } // namespace dp