mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-17 05:22:31 -04:00
fixed bug in setting msg as read
This commit is contained in:
parent
09e66cbde4
commit
48c959c858
1 changed files with 3 additions and 3 deletions
|
@ -794,9 +794,9 @@ void RsGxsChannelPostsModel::setAllMsgReadStatus(bool read_status)
|
||||||
|
|
||||||
for(uint32_t i=0;i<mPosts.size();++i)
|
for(uint32_t i=0;i<mPosts.size();++i)
|
||||||
if(read_status)
|
if(read_status)
|
||||||
mPosts[i].mMeta.mMsgStatus &= ~GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD;
|
mPosts[i].mMeta.mMsgStatus &= ~(GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD | GXS_SERV::GXS_MSG_STATUS_GUI_NEW);
|
||||||
else
|
else
|
||||||
mPosts[i].mMeta.mMsgStatus |= GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD;
|
mPosts[i].mMeta.mMsgStatus |= GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD ;
|
||||||
|
|
||||||
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(rowCount()-1,mColumns-1,(void*)NULL));
|
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(rowCount()-1,mColumns-1,(void*)NULL));
|
||||||
}
|
}
|
||||||
|
@ -820,7 +820,7 @@ void RsGxsChannelPostsModel::setMsgReadStatus(const QModelIndex& i,bool read_sta
|
||||||
// that we can catch to update the msg, but all the information is already here.
|
// that we can catch to update the msg, but all the information is already here.
|
||||||
|
|
||||||
if(read_status)
|
if(read_status)
|
||||||
mPosts[mFilteredPosts[entry]].mMeta.mMsgStatus &= ~GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD;
|
mPosts[mFilteredPosts[entry]].mMeta.mMsgStatus &= ~(GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD | GXS_SERV::GXS_MSG_STATUS_GUI_NEW);
|
||||||
else
|
else
|
||||||
mPosts[mFilteredPosts[entry]].mMeta.mMsgStatus |= GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD;
|
mPosts[mFilteredPosts[entry]].mMeta.mMsgStatus |= GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue