attempt to fix some issues on comments feeds

This commit is contained in:
defnax 2021-02-27 20:43:41 +01:00
parent ae8071c6d9
commit 1e1032ec94
4 changed files with 22 additions and 5 deletions

View file

@ -422,7 +422,9 @@ void BoardsCommentsItem::makeUpVote()
void BoardsCommentsItem::setComment(const RsGxsComment& cmt)
{
ui->commLabel->setText(RsHtml().formatText(NULL, QString::fromUtf8(cmt.mComment.c_str()), RSHTML_FORMATTEXT_EMBED_LINKS));
uint32_t autorized_lines = (int)floor((ui->avatarLabel->height() - ui->buttonHLayout->sizeHint().height())/QFontMetricsF(ui->subjectLabel->font()).height());
ui->commLabel->setText(RsHtml().formatText(NULL, RsStringUtil::CopyLines(QString::fromUtf8(cmt.mComment.c_str()), autorized_lines), RSHTML_FORMATTEXT_EMBED_LINKS));;
ui->nameLabel->setId(cmt.mMeta.mAuthorId);
ui->datetimeLabel->setText(DateTime::formatLongDateTime(cmt.mMeta.mPublishTs));