#pragma once // Spec: INV-posts 5.2 (CommentView). Guide lines, optional top divider, header, body or editor, attachments, // vote and reaction row with actions, inline reply composer. #include #include "screens/comments/CommentsProps.hpp" namespace dp { struct CommentRowInfo { int level = 0; std::optional previousLevel; bool showsTopDivider = false; bool own = false; // the viewer wrote it: edit and delete are available }; // Left padding of the divider: 16 + (max(level, previous) - level) * 16, levels capped at 3 (CommentView.swift:41-45). float commentDividerLeading(int level, std::optional previousLevel); int commentEffectiveLevel(int level); ui::ViewPtr CommentView(const Comment& comment, const CommentRowInfo& row, const CommentsProps& props); } // namespace dp