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)
|
GxsGroupFeedItem(feedHolder, feedId, groupId, isHome, rsGxsChannels, autoUpdate)
|
||||||
{
|
{
|
||||||
setup();
|
setup();
|
||||||
|
|
||||||
requestGroup();
|
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;
|
mEventHandlerId = 0;
|
||||||
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> event)
|
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> event)
|
||||||
{
|
{
|
||||||
@ -64,14 +75,6 @@ GxsChannelGroupItem::GxsChannelGroupItem(FeedHolder *feedHolder, uint32_t feedId
|
|||||||
}, mEventHandlerId, RsEventType::GXS_CHANNELS );
|
}, 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()
|
GxsChannelGroupItem::~GxsChannelGroupItem()
|
||||||
{
|
{
|
||||||
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||||
|
@ -60,6 +60,7 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
void fill();
|
void fill();
|
||||||
void setup();
|
void setup();
|
||||||
|
void addEventHandler();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RsGxsChannelGroup mGroup;
|
RsGxsChannelGroup mGroup;
|
||||||
|
@ -36,8 +36,7 @@ GxsForumGroupItem::GxsForumGroupItem(FeedHolder *feedHolder, uint32_t feedId, co
|
|||||||
{
|
{
|
||||||
setup();
|
setup();
|
||||||
requestGroup();
|
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):
|
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)
|
mRemovedModerators(removed_moderators)
|
||||||
{
|
{
|
||||||
setup();
|
setup();
|
||||||
|
|
||||||
requestGroup();
|
requestGroup();
|
||||||
|
addEventHandler();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GxsForumGroupItem::addEventHandler()
|
||||||
|
{
|
||||||
mEventHandlerId = 0;
|
mEventHandlerId = 0;
|
||||||
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> event)
|
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> event)
|
||||||
{
|
{
|
||||||
|
@ -61,6 +61,7 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
void fill();
|
void fill();
|
||||||
void setup();
|
void setup();
|
||||||
|
void addEventHandler();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RsGxsForumGroup mGroup;
|
RsGxsForumGroup mGroup;
|
||||||
|
Loading…
Reference in New Issue
Block a user