The channel message (in channels) is set to read when the user clicks on the show more button.

The forum/channel news feed is removed when the user reads the message in forums/channels.
Recompile needed.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4927 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-02-12 00:58:47 +00:00
parent d828d23ca7
commit 07ea6829b6
7 changed files with 57 additions and 8 deletions

View file

@ -313,9 +313,7 @@ void ChanMsgItem::toggle()
expandButton->setIcon(QIcon(QString(":/images/edit_remove24.png")));
expandButton->setToolTip(tr("Hide"));
if (!mIsHome) {
readToggled(false);
}
readToggled(false);
}
else
{
@ -392,12 +390,25 @@ void ChanMsgItem::readToggled(bool checked)
/* ... and as read by user */
statusNew &= ~CHANNEL_MSG_STATUS_UNREAD_BY_USER;
}
if (!mIsHome) {
disconnect( NotifyQt::getInstance(), SIGNAL(channelMsgReadSatusChanged(QString,QString,int)), this, SLOT(channelMsgReadSatusChanged(QString,QString,int)));
}
rsChannels->setMessageStatus(mChanId, mMsgId, statusNew, CHANNEL_MSG_STATUS_READ | CHANNEL_MSG_STATUS_UNREAD_BY_USER);
if (!mIsHome) {
connect( NotifyQt::getInstance(), SIGNAL(channelMsgReadSatusChanged(QString,QString,int)), this, SLOT(channelMsgReadSatusChanged(QString,QString,int)), Qt::QueuedConnection);
}
}
void ChanMsgItem::channelMsgReadSatusChanged(const QString& channelId, const QString& msgId, int /*status*/)
void ChanMsgItem::channelMsgReadSatusChanged(const QString& channelId, const QString& msgId, int status)
{
if (channelId.toStdString() == mChanId && msgId.toStdString() == mMsgId) {
if (!mIsHome) {
if (status & CHANNEL_MSG_STATUS_READ) {
close();
return;
}
}
updateItemStatic();
}
}