mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-14 20:12:29 -04:00
Show forum description as post text when no thread is selected.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6480 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
c1dddadb91
commit
393e799e5f
4 changed files with 66 additions and 2 deletions
|
@ -903,6 +903,7 @@ void GxsForumThreadWidget::insertThreads()
|
|||
}
|
||||
|
||||
mSubscribeFlags = 0;
|
||||
mForumDescription.clear();
|
||||
|
||||
ui->newmessageButton->setEnabled(false);
|
||||
ui->newthreadButton->setEnabled(false);
|
||||
|
@ -938,6 +939,7 @@ void GxsForumThreadWidget::insertForumThreads(const RsGroupMetaData &fi)
|
|||
{
|
||||
mSubscribeFlags = fi.mSubscribeFlags;
|
||||
ui->forumName->setText(QString::fromUtf8(fi.mGroupName.c_str()));
|
||||
// mForumDescription = QString::fromUtf8(fi.mDescription); // not available
|
||||
|
||||
ui->progressBarLayout->setEnabled(true);
|
||||
|
||||
|
@ -1156,7 +1158,7 @@ void GxsForumThreadWidget::fillChildren(QTreeWidgetItem *parentItem, QTreeWidget
|
|||
|
||||
void GxsForumThreadWidget::insertPost()
|
||||
{
|
||||
if (mForumId.empty() || mThreadId.empty())
|
||||
if (mForumId.empty())
|
||||
{
|
||||
ui->postText->setText("");
|
||||
ui->threadTitle->setText("");
|
||||
|
@ -1166,6 +1168,17 @@ void GxsForumThreadWidget::insertPost()
|
|||
return;
|
||||
}
|
||||
|
||||
if (mThreadId.empty())
|
||||
{
|
||||
ui->previousButton->setEnabled(false);
|
||||
ui->nextButton->setEnabled(false);
|
||||
ui->newmessageButton->setEnabled (false);
|
||||
|
||||
ui->threadTitle->setText(tr("Forum Description"));
|
||||
ui->postText->setText(mForumDescription);
|
||||
return;
|
||||
}
|
||||
|
||||
QTreeWidgetItem *item = ui->threadTreeWidget->currentItem();
|
||||
if (item) {
|
||||
QTreeWidgetItem *parentItem = item->parent();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue