mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-26 16:05:48 -04:00
enabled bannign button in forums, and disable message passing for banned users
This commit is contained in:
parent
e309dd6fed
commit
1a76bea6ff
9 changed files with 45 additions and 25 deletions
|
@ -878,7 +878,7 @@ bool GxsIdDetails::MakeIdDesc(const RsGxsId &id, bool doIcons, QString &str, QLi
|
|||
|
||||
QString GxsIdDetails::getName(const RsIdentityDetails &details)
|
||||
{
|
||||
if(!rsReputations->isIdentityOk(details.mId))
|
||||
if(rsReputations->isIdentityBanned(details.mId))
|
||||
return tr("[Banned]") ;
|
||||
|
||||
QString name = QString::fromUtf8(details.mNickname.c_str()).left(RSID_MAXIMUM_NICKNAME_SIZE);
|
||||
|
@ -897,7 +897,7 @@ QString GxsIdDetails::getComment(const RsIdentityDetails &details)
|
|||
QString comment;
|
||||
QString nickname ;
|
||||
|
||||
bool banned = !rsReputations->isIdentityOk(details.mId) ;
|
||||
bool banned = rsReputations->isIdentityBanned(details.mId) ;
|
||||
|
||||
if(details.mNickname.empty())
|
||||
nickname = tr("[Unknown]") ;
|
||||
|
@ -936,7 +936,7 @@ void GxsIdDetails::getIcons(const RsIdentityDetails &details, QList<QIcon> &icon
|
|||
{
|
||||
QPixmap pix ;
|
||||
|
||||
if(!rsReputations->isIdentityOk(details.mId))
|
||||
if(rsReputations->isIdentityBanned(details.mId))
|
||||
{
|
||||
icons.clear() ;
|
||||
icons.push_back(QIcon(IMAGE_BANNED)) ;
|
||||
|
|
|
@ -153,7 +153,7 @@ QVariant GxsIdRSTreeWidgetItem::data(int column, int role) const
|
|||
QString t = RSTreeWidgetItem::data(column, role).toString();
|
||||
QImage pix;
|
||||
|
||||
if(!rsReputations->isIdentityOk(mId))
|
||||
if(rsReputations->isIdentityBanned(mId))
|
||||
pix = QImage(BANNED_IMAGE) ;
|
||||
else if (mAvatar.mSize == 0 || !pix.loadFromData(mAvatar.mData, mAvatar.mSize, "PNG"))
|
||||
pix = GxsIdDetails::makeDefaultIcon(mId);
|
||||
|
|
|
@ -901,7 +901,7 @@ QTreeWidgetItem *GxsForumThreadWidget::convertMsgToThreadWidget(const RsGxsForum
|
|||
// is flagged with a bad reputation
|
||||
|
||||
|
||||
bool redacted = !rsReputations->isIdentityOk(msg.mMeta.mAuthorId) ;
|
||||
bool redacted = rsReputations->isIdentityBanned(msg.mMeta.mAuthorId) ;
|
||||
|
||||
GxsIdRSTreeWidgetItem *item = new GxsIdRSTreeWidgetItem(mThreadCompareRole,GxsIdDetails::ICON_TYPE_ALL || (redacted?(GxsIdDetails::ICON_TYPE_REDACTED):0));
|
||||
item->moveToThread(ui->threadTreeWidget->thread());
|
||||
|
@ -1320,7 +1320,7 @@ void GxsForumThreadWidget::insertMessageData(const RsGxsForumMsg &msg)
|
|||
return;
|
||||
}
|
||||
|
||||
bool redacted = !rsReputations->isIdentityOk(msg.mMeta.mAuthorId) ;
|
||||
bool redacted = rsReputations->isIdentityBanned(msg.mMeta.mAuthorId) ;
|
||||
|
||||
mStateHelper->setActive(mTokenTypeMessageData, true);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue