#pragma once // Spec: INV-posts 3.1 (FeedPostView). One card of the feed: hairline, header, content, poll, first attachment, // footer, reply composer, recent comments, hairline. Taps open the post, double taps vote or edit. #include #include #include #include "model/Post.hpp" #include "screens/comments/CommentsSession.hpp" #include "screens/post/PostEnvironment.hpp" #include "ui/Views.hpp" namespace dp { struct FeedPostContext { CommentsSession* session = nullptr; // required PostEnvironment env; std::string composerAnchorKey; // AnchorMark key of the open composer std::function& scrollToCommentId)> onSelect; std::function onEdit; // presents the edit screen }; ui::ViewPtr FeedPostView(const Post& post, const FeedPostContext& ctx); } // namespace dp