mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-30 09:48:59 -04:00
fixed notifications for distant search results in channels
This commit is contained in:
parent
caf0bfc4e9
commit
595df99310
8 changed files with 103 additions and 92 deletions
|
@ -155,8 +155,6 @@ private:
|
|||
|
||||
void initUi();
|
||||
|
||||
void updateSearchResults();
|
||||
|
||||
void openGroupInNewTab(const RsGxsGroupId &groupId);
|
||||
void groupSubscribe(bool subscribe);
|
||||
|
||||
|
@ -185,6 +183,8 @@ private:
|
|||
// void loadGroupSummary_CurrentGroup(const uint32_t &token);
|
||||
|
||||
protected:
|
||||
void updateSearchResults();
|
||||
|
||||
bool mCountChildMsgs; // Count unread child messages?
|
||||
|
||||
private:
|
||||
|
|
|
@ -42,11 +42,6 @@ void RsGxsUpdateBroadcastPage::setUpdateWhenInvisible(bool update)
|
|||
mBase->setUpdateWhenInvisible(update);
|
||||
}
|
||||
|
||||
const std::set<TurtleRequestId>& RsGxsUpdateBroadcastPage::getSearchResults()
|
||||
{
|
||||
return mBase->getSearchResults();
|
||||
}
|
||||
|
||||
const std::set<RsGxsGroupId> &RsGxsUpdateBroadcastPage::getGrpIdsMeta()
|
||||
{
|
||||
return mBase->getGrpIdsMeta();
|
||||
|
|
|
@ -51,7 +51,8 @@ public:
|
|||
const std::map<RsGxsGroupId, std::set<RsGxsMessageId> > &getMsgIds();
|
||||
const std::map<RsGxsGroupId, std::set<RsGxsMessageId> > &getMsgIdsMeta();
|
||||
void getAllMsgIds(std::map<RsGxsGroupId, std::set<RsGxsMessageId> > &msgIds);
|
||||
const std::set<TurtleRequestId>& getSearchResults();
|
||||
|
||||
virtual const std::set<TurtleRequestId> getSearchResults() const { return std::set<TurtleRequestId>(); } // overload this for subclasses that provide distant search
|
||||
|
||||
protected:
|
||||
virtual void showEvent(QShowEvent *event);
|
||||
|
|
|
@ -76,6 +76,11 @@ void GxsChannelDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> ev
|
|||
updateMessageSummaryList(e->mChannelGroupId);
|
||||
break;
|
||||
|
||||
case RsChannelEventCode::RECEIVED_DISTANT_SEARCH_RESULT:
|
||||
mSearchResults.insert(e->mDistantSearchRequestId);
|
||||
updateSearchResults();
|
||||
break;
|
||||
|
||||
case RsChannelEventCode::NEW_CHANNEL: // [[fallthrough]];
|
||||
case RsChannelEventCode::SUBSCRIBE_STATUS_CHANGED:
|
||||
updateDisplay(true);
|
||||
|
|
|
@ -48,6 +48,7 @@ protected:
|
|||
virtual QString getHelpString() const ;
|
||||
virtual void groupInfoToGroupItemInfo(const RsGroupMetaData &groupInfo, GroupItemInfo &groupItemInfo, const RsUserdata *userdata);
|
||||
virtual bool getDistantSearchResults(TurtleRequestId id, std::map<RsGxsGroupId,RsGxsGroupSummary>& group_infos);
|
||||
virtual const std::set<TurtleRequestId> getSearchResults() const override { return mSearchResults ; }
|
||||
|
||||
virtual TurtleRequestId distantSearch(const QString& search_string) ;
|
||||
virtual void checkRequestGroup(const RsGxsGroupId& grpId) ;
|
||||
|
@ -76,6 +77,8 @@ private:
|
|||
|
||||
void handleEvent_main_thread(std::shared_ptr<const RsEvent> event);
|
||||
|
||||
std::set<TurtleRequestId> mSearchResults;
|
||||
|
||||
RsEventsHandlerId_t mEventHandlerId;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue