fixed next unread button when new forum is selected

This commit is contained in:
csoler 2020-10-22 22:49:31 +02:00
parent bf3285dfc1
commit b01140dcbd

View File

@ -534,6 +534,7 @@ void GxsForumThreadWidget::updateDisplay(bool complete)
#ifdef DEBUG_FORUMS #ifdef DEBUG_FORUMS
std::cerr << " group_id=0. Return!"<< std::endl; std::cerr << " group_id=0. Return!"<< std::endl;
#endif #endif
ui->nextUnreadButton->setEnabled(false);
return; return;
} }
@ -984,7 +985,6 @@ void GxsForumThreadWidget::blankPost()
ui->newmessageButton->setEnabled(false); ui->newmessageButton->setEnabled(false);
ui->previousButton->setEnabled(false); ui->previousButton->setEnabled(false);
ui->nextButton->setEnabled(false); ui->nextButton->setEnabled(false);
ui->nextUnreadButton->setEnabled(false);
ui->downloadButton->setEnabled(false); ui->downloadButton->setEnabled(false);
ui->lineLeft->hide(); ui->lineLeft->hide();
ui->time_label->clear(); ui->time_label->clear();
@ -1850,7 +1850,10 @@ void GxsForumThreadWidget::filterItems(const QString& text)
void GxsForumThreadWidget::postForumLoading() void GxsForumThreadWidget::postForumLoading()
{ {
if(groupId().isNull()) if(groupId().isNull())
{
ui->nextUnreadButton->setEnabled(false);
return; return;
}
#ifdef DEBUG_FORUMS #ifdef DEBUG_FORUMS
std::cerr << "Post forum loading..." << std::endl; std::cerr << "Post forum loading..." << std::endl;
@ -1905,6 +1908,8 @@ void GxsForumThreadWidget::postForumLoading()
recursRestoreExpandedItems(mThreadProxyModel->mapFromSource(mThreadModel->root()),mSavedExpandedMessages); recursRestoreExpandedItems(mThreadProxyModel->mapFromSource(mThreadModel->root()),mSavedExpandedMessages);
//mUpdating = false; //mUpdating = false;
ui->nextUnreadButton->setEnabled(true);
} }
void GxsForumThreadWidget::updateGroupData() void GxsForumThreadWidget::updateGroupData()