From a4eedf728730ef47e0ebc560160fdcb88b64f8f5 Mon Sep 17 00:00:00 2001 From: Phenom Date: Mon, 30 Oct 2017 18:35:56 +0100 Subject: [PATCH] Hide zero File Label (size) in channel post. --- retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp b/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp index 1135a1dda..076006282 100644 --- a/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp +++ b/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp @@ -516,7 +516,12 @@ void GxsChannelPostItem::fill() ui->datetimelabel->setText(DateTime::formatLongDateTime(mPost.mMeta.mPublishTs)); - ui->filelabel->setText(QString("(%1 %2) %3").arg(mPost.mCount).arg(tr("Files")).arg(misc::friendlyUnit(mPost.mSize))); + if ( (mPost.mCount != 0) || (mPost.mSize != 0) ) { + ui->filelabel->setVisible(true); + ui->filelabel->setText(QString("(%1 %2) %3").arg(mPost.mCount).arg(tr("Files")).arg(misc::friendlyUnit(mPost.mSize))); + } else { + ui->filelabel->setVisible(false); + } if (mFileItems.empty() == false) { std::list::iterator it;