#pragma once
// Spec: INV-posts 2.4 (editablePost) and 3.1 (edit from the feed). Conversions between Post and PostDetail so the edit
// screen (which takes a PostDetail, Routes.hpp) can be opened from both the feed and the post screen.
#include "model/Post.hpp"
#include "model/PostDetail.hpp"
namespace dp {
class PostDetailAdapter {
public:
static PostDetail fromPost(const Post& post);
// PostVM.editablePost: a Post built from the detail (recent comments = all comments).
static Post toPost(const PostDetail& detail);
};
} // namespace dp