mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-26 09:41:29 -05:00
Set new messages to unread
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7599 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1bfa4df911
commit
d3682337f0
@ -2493,7 +2493,7 @@ void RsGenExchange::processRecvdMessages()
|
|||||||
|
|
||||||
if(validateReturn == VALIDATE_SUCCESS)
|
if(validateReturn == VALIDATE_SUCCESS)
|
||||||
{
|
{
|
||||||
meta->mMsgStatus = GXS_SERV::GXS_MSG_STATUS_UNPROCESSED | GXS_SERV::GXS_MSG_STATUS_GUI_NEW;
|
meta->mMsgStatus = GXS_SERV::GXS_MSG_STATUS_UNPROCESSED | GXS_SERV::GXS_MSG_STATUS_GUI_NEW | GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD;
|
||||||
msgs.insert(std::make_pair(msg, meta));
|
msgs.insert(std::make_pair(msg, meta));
|
||||||
msgIds[msg->grpId].push_back(msg->msgId);
|
msgIds[msg->grpId].push_back(msg->msgId);
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ namespace GXS_SERV {
|
|||||||
|
|
||||||
static const uint32_t GXS_MSG_STATUS_UNPROCESSED = 0x00000001;
|
static const uint32_t GXS_MSG_STATUS_UNPROCESSED = 0x00000001;
|
||||||
|
|
||||||
static const uint32_t GXS_MSG_STATUS_GUI_USER_UNREAD = 0x00000002;
|
static const uint32_t GXS_MSG_STATUS_GUI_UNREAD = 0x00000002;
|
||||||
|
|
||||||
static const uint32_t GXS_MSG_STATUS_GUI_NEW = 0x00000004;
|
static const uint32_t GXS_MSG_STATUS_GUI_NEW = 0x00000004;
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ namespace GXS_SERV {
|
|||||||
|
|
||||||
// GENERIC GXS MACROS
|
// GENERIC GXS MACROS
|
||||||
#define IS_MSG_NEW(status) (status & GXS_SERV::GXS_MSG_STATUS_GUI_NEW)
|
#define IS_MSG_NEW(status) (status & GXS_SERV::GXS_MSG_STATUS_GUI_NEW)
|
||||||
#define IS_MSG_UNREAD(status) (status & GXS_SERV::GXS_MSG_STATUS_GUI_USER_UNREAD)
|
#define IS_MSG_UNREAD(status) (status & GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD)
|
||||||
|
|
||||||
#define IS_GROUP_ADMIN(subscribeFlags) (subscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN)
|
#define IS_GROUP_ADMIN(subscribeFlags) (subscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN)
|
||||||
#define IS_GROUP_PUBLISHER(subscribeFlags) (subscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_PUBLISH)
|
#define IS_GROUP_PUBLISHER(subscribeFlags) (subscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_PUBLISH)
|
||||||
|
@ -804,8 +804,8 @@ void p3GxsChannels::setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPai
|
|||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
/* Always remove status unprocessed */
|
/* Always remove status unprocessed */
|
||||||
uint32_t mask = GXS_SERV::GXS_MSG_STATUS_GUI_NEW | GXS_SERV::GXS_MSG_STATUS_GUI_USER_UNREAD;
|
uint32_t mask = GXS_SERV::GXS_MSG_STATUS_GUI_NEW | GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD;
|
||||||
uint32_t status = GXS_SERV::GXS_MSG_STATUS_GUI_USER_UNREAD;
|
uint32_t status = GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD;
|
||||||
if (read)
|
if (read)
|
||||||
{
|
{
|
||||||
status = 0;
|
status = 0;
|
||||||
|
@ -268,8 +268,8 @@ bool p3GxsForums::createMsg(uint32_t &token, RsGxsForumMsg &msg)
|
|||||||
|
|
||||||
void p3GxsForums::setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, bool read)
|
void p3GxsForums::setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, bool read)
|
||||||
{
|
{
|
||||||
uint32_t mask = GXS_SERV::GXS_MSG_STATUS_GUI_NEW | GXS_SERV::GXS_MSG_STATUS_GUI_USER_UNREAD;
|
uint32_t mask = GXS_SERV::GXS_MSG_STATUS_GUI_NEW | GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD;
|
||||||
uint32_t status = GXS_SERV::GXS_MSG_STATUS_GUI_USER_UNREAD;
|
uint32_t status = GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD;
|
||||||
if (read)
|
if (read)
|
||||||
{
|
{
|
||||||
status = 0;
|
status = 0;
|
||||||
|
@ -150,8 +150,8 @@ void p3PostBase::service_tick()
|
|||||||
|
|
||||||
void p3PostBase::setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, bool read)
|
void p3PostBase::setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, bool read)
|
||||||
{
|
{
|
||||||
uint32_t mask = GXS_SERV::GXS_MSG_STATUS_GUI_NEW | GXS_SERV::GXS_MSG_STATUS_GUI_USER_UNREAD;
|
uint32_t mask = GXS_SERV::GXS_MSG_STATUS_GUI_NEW | GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD;
|
||||||
uint32_t status = GXS_SERV::GXS_MSG_STATUS_GUI_USER_UNREAD;
|
uint32_t status = GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD;
|
||||||
if (read)
|
if (read)
|
||||||
{
|
{
|
||||||
status = 0;
|
status = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user