mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-31 03:45:10 -04:00
properly hide the msgFrame when msg is empty in channel post item
This commit is contained in:
parent
99a106d277
commit
ab2e116fd2
1 changed files with 8 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue