mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
added code to change posts read status
This commit is contained in:
parent
010fc1dc44
commit
5dfa481f2f
9 changed files with 46 additions and 9 deletions
|
@ -176,7 +176,9 @@ public:
|
|||
|
||||
virtual bool voteForPost(bool up,const RsGxsGroupId& postGrpId,const RsGxsMessageId& postMsgId,const RsGxsId& voterId) =0;
|
||||
|
||||
enum RS_DEPRECATED RankType {TopRankType, HotRankType, NewRankType };
|
||||
virtual bool setPostReadStatus(const RsGxsGrpMsgIdPair& msgId, bool read) = 0;
|
||||
|
||||
enum RS_DEPRECATED RankType {TopRankType, HotRankType, NewRankType };
|
||||
|
||||
RS_DEPRECATED_FOR(getBoardsInfo)
|
||||
virtual bool getGroupData( const uint32_t& token,
|
||||
|
@ -205,8 +207,9 @@ public:
|
|||
//virtual bool createNewComment(uint32_t &token, RsGxsComment &comment) = 0;
|
||||
//virtual bool createNewVote(uint32_t &token, RsGxsVote &vote) = 0;
|
||||
|
||||
RS_DEPRECATED_FOR(setPostReadStatus)
|
||||
virtual void setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, bool read) = 0;
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
virtual void setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, bool read) = 0;
|
||||
|
||||
virtual bool createGroup(uint32_t &token, RsPostedGroup &group) = 0;
|
||||
virtual bool createPost(uint32_t &token, RsPostedPost &post) = 0;
|
||||
|
|
|
@ -480,6 +480,19 @@ bool p3Posted::voteForPost(bool up,const RsGxsGroupId& postGrpId,const RsGxsMess
|
|||
return true;
|
||||
}
|
||||
|
||||
bool p3Posted::setPostReadStatus(const RsGxsGrpMsgIdPair& msgId, bool read)
|
||||
{
|
||||
uint32_t token;
|
||||
|
||||
setMessageReadStatus(token,msgId,read);
|
||||
|
||||
if(waitToken(token) != RsTokenService::COMPLETE)
|
||||
{
|
||||
std::cerr << __PRETTY_FUNCTION__ << " Error! GXS operation failed." << std::endl;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool p3Posted::editBoard(RsPostedGroup& board)
|
||||
{
|
||||
uint32_t token;
|
||||
|
|
|
@ -86,6 +86,8 @@ virtual void receiveHelperChanges(std::vector<RsGxsNotify*>& changes)
|
|||
|
||||
bool voteForPost(bool up,const RsGxsGroupId& postGrpId,const RsGxsMessageId& postMsgId,const RsGxsId& voterId) override;
|
||||
|
||||
bool setPostReadStatus(const RsGxsGrpMsgIdPair& msgId, bool read) override;
|
||||
|
||||
virtual bool getGroupData(const uint32_t &token, std::vector<RsPostedGroup> &groups) override;
|
||||
virtual bool getPostData(const uint32_t &token, std::vector<RsPostedPost> &posts, std::vector<RsGxsComment> &cmts, std::vector<RsGxsVote> &vots) override;
|
||||
virtual bool getPostData(const uint32_t &token, std::vector<RsPostedPost> &posts, std::vector<RsGxsComment> &cmts) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue