mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed missing event handler registration
This commit is contained in:
parent
55651e73d9
commit
ab61149cb1
@ -37,9 +37,20 @@ GxsChannelGroupItem::GxsChannelGroupItem(FeedHolder *feedHolder, uint32_t feedId
|
||||
GxsGroupFeedItem(feedHolder, feedId, groupId, isHome, rsGxsChannels, autoUpdate)
|
||||
{
|
||||
setup();
|
||||
|
||||
requestGroup();
|
||||
addEventHandler();
|
||||
}
|
||||
|
||||
GxsChannelGroupItem::GxsChannelGroupItem(FeedHolder *feedHolder, uint32_t feedId, const RsGxsChannelGroup &group, bool isHome, bool autoUpdate) :
|
||||
GxsGroupFeedItem(feedHolder, feedId, group.mMeta.mGroupId, isHome, rsGxsChannels, autoUpdate)
|
||||
{
|
||||
setup();
|
||||
setGroup(group);
|
||||
addEventHandler();
|
||||
}
|
||||
|
||||
void GxsChannelGroupItem::addEventHandler()
|
||||
{
|
||||
mEventHandlerId = 0;
|
||||
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> event)
|
||||
{
|
||||
@ -64,14 +75,6 @@ GxsChannelGroupItem::GxsChannelGroupItem(FeedHolder *feedHolder, uint32_t feedId
|
||||
}, mEventHandlerId, RsEventType::GXS_CHANNELS );
|
||||
}
|
||||
|
||||
GxsChannelGroupItem::GxsChannelGroupItem(FeedHolder *feedHolder, uint32_t feedId, const RsGxsChannelGroup &group, bool isHome, bool autoUpdate) :
|
||||
GxsGroupFeedItem(feedHolder, feedId, group.mMeta.mGroupId, isHome, rsGxsChannels, autoUpdate)
|
||||
{
|
||||
setup();
|
||||
|
||||
setGroup(group);
|
||||
}
|
||||
|
||||
GxsChannelGroupItem::~GxsChannelGroupItem()
|
||||
{
|
||||
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||
|
@ -60,6 +60,7 @@ private slots:
|
||||
private:
|
||||
void fill();
|
||||
void setup();
|
||||
void addEventHandler();
|
||||
|
||||
private:
|
||||
RsGxsChannelGroup mGroup;
|
||||
|
@ -36,8 +36,7 @@ GxsForumGroupItem::GxsForumGroupItem(FeedHolder *feedHolder, uint32_t feedId, co
|
||||
{
|
||||
setup();
|
||||
requestGroup();
|
||||
|
||||
|
||||
addEventHandler();
|
||||
}
|
||||
|
||||
GxsForumGroupItem::GxsForumGroupItem(FeedHolder *feedHolder, uint32_t feedId, const RsGxsGroupId &groupId, const std::list<RsGxsId>& added_moderators,const std::list<RsGxsId>& removed_moderators,bool isHome, bool autoUpdate):
|
||||
@ -46,9 +45,12 @@ GxsForumGroupItem::GxsForumGroupItem(FeedHolder *feedHolder, uint32_t feedId, co
|
||||
mRemovedModerators(removed_moderators)
|
||||
{
|
||||
setup();
|
||||
|
||||
requestGroup();
|
||||
addEventHandler();
|
||||
}
|
||||
|
||||
void GxsForumGroupItem::addEventHandler()
|
||||
{
|
||||
mEventHandlerId = 0;
|
||||
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> event)
|
||||
{
|
||||
|
@ -61,6 +61,7 @@ private slots:
|
||||
private:
|
||||
void fill();
|
||||
void setup();
|
||||
void addEventHandler();
|
||||
|
||||
private:
|
||||
RsGxsForumGroup mGroup;
|
||||
|
Loading…
Reference in New Issue
Block a user