disable post details when no post is selected (prevents posting comments to empty post)

This commit is contained in:
csoler 2020-09-09 23:19:36 +02:00
parent 4d934993f3
commit 96a8c23f1e

View File

@ -671,9 +671,11 @@ void GxsChannelPostsWidgetWithModel::showPostDetails()
ui->postName_LB->hide(); ui->postName_LB->hide();
ui->postTime_LB->hide(); ui->postTime_LB->hide();
mChannelPostFilesModel->clear(); mChannelPostFilesModel->clear();
ui->details_TW->setEnabled(false);
return; return;
} }
ui->details_TW->setEnabled(true);
ui->postLogo_LB->show(); ui->postLogo_LB->show();
ui->postName_LB->show(); ui->postName_LB->show();
@ -1090,6 +1092,7 @@ void GxsChannelPostsWidgetWithModel::insertChannelDetails(const RsGxsChannelGrou
#endif #endif
ui->subscribeToolButton->setText(tr("Subscribe ") + " " + QString::number(group.mMeta.mPop) ); ui->subscribeToolButton->setText(tr("Subscribe ") + " " + QString::number(group.mMeta.mPop) );
showPostDetails();
} }
#ifdef TODO #ifdef TODO