fixed redraw of channels and boards info when editing the group data

This commit is contained in:
csoler 2020-11-28 23:10:40 +01:00
parent 056ab8da56
commit ac7e2b5582
3 changed files with 25 additions and 3 deletions

View File

@ -335,7 +335,16 @@ void p3GxsChannels::notifyChanges(std::vector<RsGxsNotify *> &changes)
}
break;
case RsGxsNotify::TYPE_PUBLISHED:
case RsGxsNotify::TYPE_UPDATED:
{
auto ev = std::make_shared<RsGxsChannelEvent>();
ev->mChannelGroupId = grpChange->mGroupId;
ev->mChannelEventCode = RsChannelEventCode::UPDATED_CHANNEL;
rsEvents->postEvent(ev);
}
break;
case RsGxsNotify::TYPE_PUBLISHED:
case RsGxsNotify::TYPE_RECEIVED_NEW:
{
/* group received */

View File

@ -188,6 +188,18 @@ void p3PostBase::notifyChanges(std::vector<RsGxsNotify *> &changes)
}
break;
case RsGxsNotify::TYPE_UPDATED:
{
// Happens when the group data has changed. In this case we need to analyse the old and new group in order to detect possible notifications for clients
auto ev = std::make_shared<RsGxsPostedEvent>();
ev->mPostedGroupId = grpChange->mGroupId;
ev->mPostedEventCode = RsPostedEventCode::UPDATED_POSTED_GROUP;
rsEvents->postEvent(ev);
}
break;
case RsGxsNotify::TYPE_PUBLISHED:
case RsGxsNotify::TYPE_RECEIVED_NEW:
{

View File

@ -73,10 +73,11 @@ void GxsChannelDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> ev
updateGroupStatisticsReal(e->mChannelGroupId);// update the list immediately
break;
case RsChannelEventCode::UPDATED_CHANNEL: // [[fallthrough]];
case RsChannelEventCode::RECEIVED_PUBLISH_KEY: // [[fallthrough]];
case RsChannelEventCode::NEW_CHANNEL: // [[fallthrough]];
case RsChannelEventCode::SUBSCRIBE_STATUS_CHANGED:// reloads group summary (calling GxsGroupFrameDialog parent method)
updateDisplay(true);
case RsChannelEventCode::SUBSCRIBE_STATUS_CHANGED:
updateDisplay(true); // reloads group summary (calling GxsGroupFrameDialog parent method)
break;
default: