mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-14 20:12:29 -04:00
avoid calling rsGxsChannels::setMessageReadStatus() when the message status is already what we want. Removed one warning that has been cleared.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7964 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ab9cb2b600
commit
7178285d60
4 changed files with 23 additions and 11 deletions
|
@ -505,15 +505,20 @@ void GxsChannelPostsWidget::insertRelatedPosts(const uint32_t &token)
|
|||
|
||||
static void setAllMessagesReadCallback(FeedItem *feedItem, void *data)
|
||||
{
|
||||
GxsChannelPostItem *channelPostItem = dynamic_cast<GxsChannelPostItem*>(feedItem);
|
||||
if (!channelPostItem) {
|
||||
return;
|
||||
}
|
||||
GxsChannelPostItem *channelPostItem = dynamic_cast<GxsChannelPostItem*>(feedItem);
|
||||
if (!channelPostItem) {
|
||||
return;
|
||||
}
|
||||
|
||||
RsGxsGrpMsgIdPair msgPair = std::make_pair(channelPostItem->groupId(), channelPostItem->messageId());
|
||||
bool is_not_new = !channelPostItem->isUnread() ;
|
||||
|
||||
uint32_t token;
|
||||
rsGxsChannels->setMessageReadStatus(token, msgPair, *((bool*) data));
|
||||
if(is_not_new == *(bool*)data)
|
||||
return ;
|
||||
|
||||
RsGxsGrpMsgIdPair msgPair = std::make_pair(channelPostItem->groupId(), channelPostItem->messageId());
|
||||
|
||||
uint32_t token;
|
||||
rsGxsChannels->setMessageReadStatus(token, msgPair, *((bool*) data));
|
||||
}
|
||||
|
||||
void GxsChannelPostsWidget::setAllMessagesRead(bool read)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue