mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-02 11:16:34 -04:00
renamed SSGXSChannelGroup to GxsChannelGroupInfo, mCount in RsGxsChannelPost to mAttachmentCount and added a mCommentCount member. Also added some missing override in p3gxschannels.cc
This commit is contained in:
parent
207dfabbca
commit
dc90d6f6dc
6 changed files with 44 additions and 41 deletions
|
@ -573,9 +573,9 @@ void GxsChannelPostItem::fill()
|
|||
|
||||
ui->datetimelabel->setText(DateTime::formatLongDateTime(mPost.mMeta.mPublishTs));
|
||||
|
||||
if ( (mPost.mCount != 0) || (mPost.mSize != 0) ) {
|
||||
if ( (mPost.mAttachmentCount != 0) || (mPost.mSize != 0) ) {
|
||||
ui->filelabel->setVisible(true);
|
||||
ui->filelabel->setText(QString("(%1 %2) %3").arg(mPost.mCount).arg( (mPost.mCount > 1)?tr("Files"):tr("File")).arg(misc::friendlyUnit(mPost.mSize)));
|
||||
ui->filelabel->setText(QString("(%1 %2) %3").arg(mPost.mAttachmentCount).arg( (mPost.mAttachmentCount > 1)?tr("Files"):tr("File")).arg(misc::friendlyUnit(mPost.mSize)));
|
||||
} else {
|
||||
ui->filelabel->setVisible(false);
|
||||
}
|
||||
|
|
|
@ -222,8 +222,8 @@ void ChannelPostDelegate::paint(QPainter * painter, const QStyleOptionViewItem &
|
|||
|
||||
QString info_text = QDateTime::fromMSecsSinceEpoch(qint64(1000)*post.mMeta.mPublishTs).toString(Qt::DefaultLocaleShortDate);
|
||||
|
||||
if(post.mCount > 0)
|
||||
info_text += ", " + QString::number(post.mCount)+ " " +((post.mCount>1)?tr("files"):tr("file")) + " (" + misc::friendlyUnit(qulonglong(post.mSize)) + ")" ;
|
||||
if(post.mAttachmentCount > 0)
|
||||
info_text += ", " + QString::number(post.mAttachmentCount)+ " " +((post.mAttachmentCount>1)?tr("files"):tr("file")) + " (" + misc::friendlyUnit(qulonglong(post.mSize)) + ")" ;
|
||||
|
||||
painter->drawText(QPoint(p.x()+0.5*font_height,y),info_text);
|
||||
y += font_height;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue