mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-29 01:16:20 -05:00
fixed small bug causing read/unread and new msgs to not update immediately
This commit is contained in:
parent
a8f94f9d74
commit
54f8ef1ffe
@ -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);
|
||||
|
@ -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]];
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user