added "Loading..." message when loading posts in channels

This commit is contained in:
csoler 2022-07-13 16:00:47 +02:00
parent a1c33bf172
commit d143355a09

View File

@ -901,7 +901,10 @@ void GxsChannelPostsWidgetWithModel::updateGroupData()
}
mGroup = group;
mChannelPostsModel->updateChannel(groupId());
ui->postsTree->setPlaceholderText(tr("Loading..."));
mChannelPostsModel->updateChannel(groupId());
whileBlocking(ui->filterLineEdit)->clear();
whileBlocking(ui->showUnread_TB)->setChecked(false);
@ -944,6 +947,9 @@ void GxsChannelPostsWidgetWithModel::postChannelPostLoad()
ui->channelFiles_TV->sortByColumn(ui->channelFiles_TV->header()->sortIndicatorSection()
,ui->channelFiles_TV->header()->sortIndicatorOrder());
// if there's no posts, this is what's going to be displayed.
ui->postsTree->setPlaceholderText(tr("No posts available in this channel."));
ui->infoPosts->setText(QString::number(mChannelPostsModel->getNumberOfPosts()) + " / " + QString::number(mGroup.mMeta.mVisibleMsgCount));
// now compute aspect ratio for posts. We do that by looking at the 5 latest posts and compute the best aspect ratio for them.