fixed 2 bugs in post display

This commit is contained in:
csoler 2023-03-23 22:07:28 +01:00
parent 141ee0b7e0
commit dec1d3068b
4 changed files with 5 additions and 10 deletions

@ -1 +1 @@
Subproject commit 2ddc86fb575a61170f4c06a00152e3e7dc74c8f4
Subproject commit 659423769541169457c41f71c8a038e2d64ba079

@ -1 +1 @@
Subproject commit a9d4447c5660337b4f7945d20e0f4ffd68d918e9
Subproject commit 74cd958cf8a3c8b3e2d3f8a22657b5e16bdad476

View File

@ -780,6 +780,7 @@ void GxsChannelPostsWidgetWithModel::handleEvent_main_thread(std::shared_ptr<con
}
break;
case RsChannelEventCode::READ_STATUS_CHANGED:
case RsChannelEventCode::NEW_MESSAGE:
{
if(e->mChannelGroupId == groupId())
@ -821,7 +822,7 @@ void GxsChannelPostsWidgetWithModel::handleEvent_main_thread(std::shared_ptr<con
// 2 - update the model in the UI thread.
RsQThreadUtils::postToObject( [&post=posts[0],this]()
RsQThreadUtils::postToObject( [post=posts[0],this]()
{
std::set<RsGxsFile> added_files,removed_files;
@ -847,10 +848,6 @@ void GxsChannelPostsWidgetWithModel::handleEvent_main_thread(std::shared_ptr<con
ui->commentsDialog->refresh();
break;
case RsChannelEventCode::READ_STATUS_CHANGED:
mChannelPostsModel->triggerViewUpdate();
break;
default:
break;
@ -995,8 +992,6 @@ void GxsChannelPostsWidgetWithModel::updateData(bool update_group_data, bool upd
if(update_posts)
{
blank();
ui->postsTree->setPlaceholderText(tr("Loading..."));
mChannelPostsModel->updateChannel(groupId());

@ -1 +1 @@
Subproject commit a593b9c808f90cce7d47a5de86c207ef8675945f
Subproject commit 5cc37b3e5ad6b64b247e9d2066a9b6c8acae67ce