FeedReader:

- Recalculate message count of the user notify when a feed with new items is deleted.
- Set deleted message to read and !new.
- Added test feed item in notify settings.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6072 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2013-01-14 22:41:31 +00:00
parent 6f7c424b1f
commit ddc4a37a93
11 changed files with 78 additions and 2 deletions

View file

@ -204,6 +204,7 @@ static void feedMsgToInfo(const RsFeedReaderMsg *msg, FeedMsgInfo &info)
info.flag.isnew = (msg->flag & RS_FEEDMSG_FLAG_NEW);
info.flag.read = (msg->flag & RS_FEEDMSG_FLAG_READ);
info.flag.deleted = (msg->flag & RS_FEEDMSG_FLAG_DELETED);
}
void p3FeedReader::setNotify(RsFeedReaderNotify *notify)
@ -758,7 +759,8 @@ bool p3FeedReader::removeMsg(const std::string &feedId, const std::string &msgId
return false;
}
msgIt->second->flag |= RS_FEEDMSG_FLAG_DELETED;
msgIt->second->flag |= RS_FEEDMSG_FLAG_DELETED | RS_FEEDMSG_FLAG_READ;
msgIt->second->flag &= ~RS_FEEDMSG_FLAG_NEW;
}
if (changed) {
@ -803,7 +805,8 @@ bool p3FeedReader::removeMsgs(const std::string &feedId, const std::list<std::st
continue;
}
msgIt->second->flag |= RS_FEEDMSG_FLAG_DELETED;
msgIt->second->flag |= RS_FEEDMSG_FLAG_DELETED | RS_FEEDMSG_FLAG_READ;
msgIt->second->flag &= ~RS_FEEDMSG_FLAG_NEW;
removedMsgs.push_back(*idIt);
}