Skip to content
Repos

DevPlaceApp

C++ 590 B20 lines Opens in site

Directory Raw Download

#pragma once
// Spec: INV-posts 3.2. HStack(alignment top){ avatar (links to the profile when allowed), Spacer, VStack(trailing,
// spacing 4){ relative time, optional comment count } }.
#include <optional>

#include "core/Date.hpp"
#include "model/User.hpp"
#include "screens/post/PostEnvironment.hpp"
#include "ui/Views.hpp"

namespace dp {

struct PostHeaderOptions {
  bool linksToProfile = true;
  std::optional<std::int64_t> commentCount;
};

ui::ViewPtr PostHeaderView(const User& author, Date date, const PostHeaderOptions& options, const PostEnvironment& env);

}  // namespace dp
37.1ms