added some missing notifications in circles dialog

This commit is contained in:
csoler 2020-01-28 22:22:04 +01:00
parent 424e7be52f
commit 841ba9e579
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
4 changed files with 54 additions and 20 deletions

View file

@ -182,9 +182,11 @@ enum class RsGxsCircleEventCode: uint8_t
/// mCircleId contains the circle id and mGxsId is the id of the new member
CIRCLE_MEMBERSHIP_JOIN = 0x04,
/** mCircleId contains the circle id and mGxsId is the id that was revoqued
* by admin */
/** mCircleId contains the circle id and mGxsId is the id that was revoqued * by admin */
CIRCLE_MEMBERSHIP_REVOQUED= 0x05,
/** mCircleId contains the circle id */
NEW_CIRCLE = 0x06,
};
struct RsGxsCircleEvent: RsEvent

View file

@ -547,6 +547,14 @@ void p3GxsCircles::notifyChanges(std::vector<RsGxsNotify *> &changes)
RsStackMutex stack(mCircleMtx); /********** STACK LOCKED MTX ******/
mCircleCache.erase(RsGxsCircleId(*git));
}
if(rsEvents && (c->getType() == RsGxsNotify::TYPE_RECEIVED_NEW|| c->getType() == RsGxsNotify::TYPE_PUBLISHED) )
{
auto ev = std::make_shared<RsGxsCircleEvent>();
ev->mCircleId = RsGxsCircleId(*git);
ev->mCircleEventType = RsGxsCircleEventCode::NEW_CIRCLE;
rsEvents->postEvent(ev);
}
}
}