fixed small bug causing read/unread and new msgs to not update immediately

This commit is contained in:
csoler 2020-04-12 23:07:42 +02:00
parent a8f94f9d74
commit 54f8ef1ffe
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C
5 changed files with 7 additions and 8 deletions

View File

@ -123,7 +123,7 @@ public:
void requestGroupStatistic(uint32_t& token, const RsGxsGroupId& grpId, const RsTokReqOptions &opts) override;
/* Poll */
GxsRequestStatus requestStatus(const uint32_t token);
GxsRequestStatus requestStatus(uint32_t token);
/* Cancel Request */
bool cancelRequest(const uint32_t &token);

View File

@ -62,7 +62,7 @@ void PostedDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> event)
case RsPostedEventCode::NEW_MESSAGE:
case RsPostedEventCode::UPDATED_MESSAGE: // [[fallthrough]];
case RsPostedEventCode::READ_STATUS_CHANGED: // [[fallthrough]];
updateMessageSummaryList(e->mPostedGroupId);
updateGroupStatisticsReal(e->mPostedGroupId); // update the list immediately
break;
case RsPostedEventCode::NEW_POSTED_GROUP: // [[fallthrough]];

View File

@ -105,7 +105,6 @@ protected:
virtual bool getGroupData(std::list<RsGxsGenericGroupData*>& groupInfo) =0;
virtual bool getGroupStatistics(const RsGxsGroupId& groupId,GxsGroupStatistic& stat) =0;
private:
void updateGroupStatisticsReal(const RsGxsGroupId &groupId);
void updateMessageSummaryListReal(RsGxsGroupId groupId);

View File

@ -65,9 +65,9 @@ void GxsChannelDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> ev
switch(e->mChannelEventCode)
{
case RsChannelEventCode::NEW_MESSAGE: // [[fallthrough]];
case RsChannelEventCode::UPDATED_MESSAGE:
case RsChannelEventCode::READ_STATUS_CHANGED:
updateMessageSummaryList(e->mChannelGroupId);
case RsChannelEventCode::UPDATED_MESSAGE: // [[fallthrough]];
case RsChannelEventCode::READ_STATUS_CHANGED: // [[fallthrough]];
updateGroupStatisticsReal(e->mChannelGroupId); // update the list immediately
break;
case RsChannelEventCode::RECEIVED_DISTANT_SEARCH_RESULT:

View File

@ -62,7 +62,7 @@ void GxsForumsDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> eve
case RsForumEventCode::NEW_MESSAGE:
case RsForumEventCode::UPDATED_MESSAGE: // [[fallthrough]];
case RsForumEventCode::READ_STATUS_CHANGED:
updateMessageSummaryList(e->mForumGroupId);
updateGroupStatisticsReal(e->mForumGroupId); // update the list immediately
break;
case RsForumEventCode::NEW_FORUM: // [[fallthrough]];
@ -71,7 +71,7 @@ void GxsForumsDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> eve
break;
case RsForumEventCode::STATISTICS_CHANGED:
updateGroupStatistics(e->mForumGroupId);
updateGroupStatistics(e->mForumGroupId); // update the list when redraw less often than once every 2 mins
break;
default: