Merge pull request #25 from defnax/boards-fix

Fix for Card View to show the Banned Image when author is banned.
This commit is contained in:
csoler 2020-10-08 20:42:15 +02:00 committed by GitHub
commit e2b9100380
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -479,6 +479,15 @@ void BoardPostDisplayWidget_card::setup()
{
BoardPostDisplayWidgetBase::setup();
RsReputationLevel overall_reputation = rsReputations->overallReputationLevel(mPost.mMeta.mAuthorId);
bool redacted = (overall_reputation == RsReputationLevel::LOCALLY_NEGATIVE);
if(redacted)
{
ui->pictureLabel->setPixmap( FilesDefs::getPixmapFromQtResourcePath(":/images/thumb-blocked.png") );
}
else
{
if(mPost.mImage.mData != NULL)
{
QPixmap pixmap;
@ -497,6 +506,7 @@ void BoardPostDisplayWidget_card::setup()
}
else
ui->pictureLabel->hide();
}
QTextDocument doc;
doc.setHtml(notes()->text());