moved UserNotify to MainPage level, and added RsEvent handling code in Posted

This commit is contained in:
csoler 2020-01-26 23:19:20 +01:00
parent 9c65836503
commit fb9282f588
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
28 changed files with 140 additions and 51 deletions

View file

@ -64,7 +64,11 @@ void GxsChannelDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> ev
switch(e->mChannelEventCode)
{
case RsChannelEventCode::SUBSCRIBE_STATUS_CHANGED: updateDisplay(true);
case RsChannelEventCode::READ_STATUS_CHANGED:
updateMessageSummaryList(e->mChannelGroupId);
break;
case RsChannelEventCode::SUBSCRIBE_STATUS_CHANGED:
updateDisplay(true);
break;
default:
break;
@ -92,7 +96,7 @@ QString GxsChannelDialog::getHelpString() const
return hlp_str ;
}
UserNotify *GxsChannelDialog::getUserNotify(QObject *parent)
UserNotify *GxsChannelDialog::createUserNotify(QObject *parent)
{
return new GxsChannelUserNotify(rsGxsChannels, parent);
}

View file

@ -39,8 +39,6 @@ public:
virtual QString pageName() const { return tr("Channels") ; } //MainPage
virtual QString helpText() const { return ""; } //MainPage
virtual UserNotify *getUserNotify(QObject *parent);
void shareOnChannel(const RsGxsGroupId& channel_id, const QList<RetroShareLink>& file_link) ;
protected:
@ -54,6 +52,7 @@ protected:
virtual TurtleRequestId distantSearch(const QString& search_string) ;
virtual void checkRequestGroup(const RsGxsGroupId& grpId) ;
virtual UserNotify *createUserNotify(QObject *parent) override;
private slots:
void toggleAutoDownload();
void setDefaultDirectory();