Merge pull request #1094 from PhenomRetroShare/Add_HideFileLabelInChannelPost

Hide zero File Label (size) in channel post.
This commit is contained in:
csoler 2017-11-01 20:34:35 +01:00 committed by GitHub
commit d8c4f88b27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<SubFileItem *>::iterator it;