mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 00:19:25 -05:00
properly hide the msgFrame when msg is empty in channel post item
This commit is contained in:
parent
99a106d277
commit
ab2e116fd2
@ -471,7 +471,13 @@ void GxsChannelPostItem::fill()
|
||||
voteDownButton->setEnabled(false);
|
||||
}*/
|
||||
|
||||
ui->msgFrame->setVisible(!mPost.mMsg.empty());
|
||||
{
|
||||
QTextDocument doc;
|
||||
doc.setHtml( QString::fromUtf8(mPost.mMsg.c_str()) );
|
||||
|
||||
ui->msgFrame->setVisible(doc.toPlainText().length() > 0);
|
||||
}
|
||||
|
||||
if (wasExpanded() || ui->expandFrame->isVisible()) {
|
||||
fillExpandFrame();
|
||||
}
|
||||
@ -524,7 +530,7 @@ void GxsChannelPostItem::fill()
|
||||
void GxsChannelPostItem::fillExpandFrame()
|
||||
{
|
||||
ui->msgLabel->setText(RsHtml().formatText(NULL, QString::fromUtf8(mPost.mMsg.c_str()), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS));
|
||||
ui->msgFrame->setVisible(!mPost.mMsg.empty());
|
||||
|
||||
}
|
||||
|
||||
QString GxsChannelPostItem::messageName()
|
||||
|
Loading…
Reference in New Issue
Block a user