2014-05-04 18:59:06 -04:00
|
|
|
/****************************************************************
|
|
|
|
* RetroShare is distributed under the following license:
|
|
|
|
*
|
|
|
|
* Copyright (C) 2008 Robert Fernie
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
****************************************************************/
|
|
|
|
|
|
|
|
#include "GxsChannelPostsWidget.h"
|
|
|
|
#include "ui_GxsChannelPostsWidget.h"
|
|
|
|
#include "gui/feeds/GxsChannelPostItem.h"
|
|
|
|
#include "gui/gxschannels/CreateGxsChannelMsg.h"
|
|
|
|
#include "gui/common/UIStateHelper.h"
|
2014-05-27 02:57:45 -04:00
|
|
|
#include "gui/settings/rsharesettings.h"
|
|
|
|
#include "gui/feeds/SubFileItem.h"
|
2014-05-04 18:59:06 -04:00
|
|
|
|
2014-05-05 17:53:47 -04:00
|
|
|
#include <algorithm>
|
|
|
|
|
2014-05-04 18:59:06 -04:00
|
|
|
#define CHAN_DEFAULT_IMAGE ":/images/channels.png"
|
|
|
|
|
|
|
|
/****
|
|
|
|
* #define DEBUG_CHANNEL
|
|
|
|
***/
|
|
|
|
|
2014-05-27 02:57:45 -04:00
|
|
|
/* Filters */
|
|
|
|
#define FILTER_TITLE 1
|
|
|
|
#define FILTER_MSG 2
|
|
|
|
#define FILTER_FILE_NAME 3
|
|
|
|
#define FILTER_COUNT 3
|
|
|
|
|
2014-05-04 18:59:06 -04:00
|
|
|
/** Constructor */
|
2014-05-06 16:19:04 -04:00
|
|
|
GxsChannelPostsWidget::GxsChannelPostsWidget(const RsGxsGroupId &channelId, QWidget *parent) :
|
2014-07-23 14:51:56 -04:00
|
|
|
GxsMessageFramePostWidget(rsGxsChannels, parent),
|
2014-05-04 18:59:06 -04:00
|
|
|
ui(new Ui::GxsChannelPostsWidget)
|
|
|
|
{
|
|
|
|
/* Invoke the Qt Designer generated object setup routine */
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
|
|
|
/* Setup UI helper */
|
|
|
|
|
2014-05-05 17:53:47 -04:00
|
|
|
// No progress yet
|
2014-07-23 14:51:56 -04:00
|
|
|
mStateHelper->addWidget(mTokenTypePosts, ui->loadingLabel, UISTATE_LOADING_VISIBLE);
|
|
|
|
// mStateHelper->addWidget(mTokenTypePosts, ui->progressBar, UISTATE_LOADING_VISIBLE);
|
|
|
|
// mStateHelper->addWidget(mTokenTypePosts, ui->progressLabel, UISTATE_LOADING_VISIBLE);
|
2014-05-04 18:59:06 -04:00
|
|
|
|
2014-07-23 14:51:56 -04:00
|
|
|
mStateHelper->addLoadPlaceholder(mTokenTypeGroupData, ui->nameLabel);
|
2014-05-04 18:59:06 -04:00
|
|
|
|
2014-07-23 14:51:56 -04:00
|
|
|
mStateHelper->addWidget(mTokenTypeGroupData, ui->postButton);
|
|
|
|
mStateHelper->addWidget(mTokenTypeGroupData, ui->logoLabel);
|
|
|
|
mStateHelper->addWidget(mTokenTypeGroupData, ui->subscribeToolButton);
|
2014-05-04 18:59:06 -04:00
|
|
|
|
|
|
|
connect(ui->postButton, SIGNAL(clicked()), this, SLOT(createMsg()));
|
2014-07-05 14:33:11 -04:00
|
|
|
connect(ui->subscribeToolButton, SIGNAL(subscribe(bool)), this, SLOT(subscribeGroup(bool)));
|
|
|
|
|
2014-05-27 02:57:45 -04:00
|
|
|
/* add filter actions */
|
|
|
|
ui->filterLineEdit->addFilter(QIcon(), tr("Title"), FILTER_TITLE, tr("Search Title"));
|
|
|
|
ui->filterLineEdit->addFilter(QIcon(), tr("Message"), FILTER_MSG, tr("Search Message"));
|
|
|
|
ui->filterLineEdit->addFilter(QIcon(), tr("Filename"), FILTER_FILE_NAME, tr("Search Filename"));
|
|
|
|
ui->filterLineEdit->setCurrentFilter( Settings->valueFromGroup("ChannelFeed", "filter", FILTER_TITLE).toInt());
|
|
|
|
connect(ui->filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterItems(QString)));
|
|
|
|
connect(ui->filterLineEdit, SIGNAL(filterChanged(int)), this, SLOT(filterChanged(int)));
|
2014-05-04 18:59:06 -04:00
|
|
|
|
|
|
|
/*************** Setup Left Hand Side (List of Channels) ****************/
|
|
|
|
|
2014-05-06 16:55:30 -04:00
|
|
|
ui->loadingLabel->hide();
|
2014-05-04 18:59:06 -04:00
|
|
|
ui->progressLabel->hide();
|
|
|
|
ui->progressBar->hide();
|
|
|
|
|
|
|
|
ui->nameLabel->setMinimumWidth(20);
|
|
|
|
|
2014-05-27 02:57:45 -04:00
|
|
|
mInProcessSettings = false;
|
|
|
|
|
2014-05-04 18:59:06 -04:00
|
|
|
/* load settings */
|
|
|
|
processSettings(true);
|
|
|
|
|
2014-07-05 14:33:11 -04:00
|
|
|
/* Initialize subscribe button */
|
|
|
|
QIcon icon;
|
|
|
|
icon.addPixmap(QPixmap(":/images/redled.png"), QIcon::Normal, QIcon::On);
|
|
|
|
icon.addPixmap(QPixmap(":/images/start.png"), QIcon::Normal, QIcon::Off);
|
|
|
|
mAutoDownloadAction = new QAction(icon, "", this);
|
|
|
|
mAutoDownloadAction->setCheckable(true);
|
|
|
|
connect(mAutoDownloadAction, SIGNAL(triggered()), this, SLOT(toggleAutoDownload()));
|
|
|
|
|
|
|
|
ui->subscribeToolButton->addSubscribedAction(mAutoDownloadAction);
|
|
|
|
|
2014-05-04 18:59:06 -04:00
|
|
|
/* Initialize GUI */
|
2014-07-05 14:33:11 -04:00
|
|
|
setAutoDownload(false);
|
2014-05-04 18:59:06 -04:00
|
|
|
setGroupId(channelId);
|
|
|
|
}
|
|
|
|
|
|
|
|
GxsChannelPostsWidget::~GxsChannelPostsWidget()
|
|
|
|
{
|
|
|
|
// save settings
|
|
|
|
processSettings(false);
|
2014-07-05 14:33:11 -04:00
|
|
|
|
|
|
|
delete(mAutoDownloadAction);
|
2014-07-24 12:52:11 -04:00
|
|
|
|
|
|
|
delete ui;
|
2014-05-04 18:59:06 -04:00
|
|
|
}
|
|
|
|
|
2014-07-24 12:52:11 -04:00
|
|
|
void GxsChannelPostsWidget::processSettings(bool /*load*/)
|
2014-05-04 18:59:06 -04:00
|
|
|
{
|
2014-05-27 02:57:45 -04:00
|
|
|
mInProcessSettings = true;
|
2014-07-24 12:52:11 -04:00
|
|
|
// Settings->beginGroup(QString("ChannelPostsWidget"));
|
2014-05-04 18:59:06 -04:00
|
|
|
//
|
|
|
|
// if (load) {
|
|
|
|
// // load settings
|
|
|
|
// } else {
|
|
|
|
// // save settings
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// Settings->endGroup();
|
2014-05-27 02:57:45 -04:00
|
|
|
mInProcessSettings = false;
|
2014-05-04 18:59:06 -04:00
|
|
|
}
|
|
|
|
|
2014-07-23 14:51:56 -04:00
|
|
|
void GxsChannelPostsWidget::groupNameChanged(const QString &name)
|
2014-05-04 18:59:06 -04:00
|
|
|
{
|
2014-07-23 14:51:56 -04:00
|
|
|
if (groupId().isNull()) {
|
|
|
|
ui->nameLabel->setText(tr("No Channel Selected"));
|
|
|
|
ui->logoLabel->setPixmap(QPixmap(":/images/channels.png"));
|
|
|
|
} else {
|
|
|
|
ui->nameLabel->setText(name);
|
2014-05-04 18:59:06 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
QIcon GxsChannelPostsWidget::groupIcon()
|
|
|
|
{
|
2014-07-23 14:51:56 -04:00
|
|
|
if (mStateHelper->isLoading(mTokenTypeGroupData) || mStateHelper->isLoading(mTokenTypePosts)) {
|
2014-05-04 18:59:06 -04:00
|
|
|
return QIcon(":/images/kalarm.png");
|
|
|
|
}
|
|
|
|
|
|
|
|
// if (mNewCount) {
|
|
|
|
// return QIcon(":/images/message-state-new.png");
|
|
|
|
// }
|
|
|
|
|
|
|
|
return QIcon();
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************************/
|
|
|
|
/*************************************************************************************/
|
|
|
|
/*************************************************************************************/
|
|
|
|
|
|
|
|
QScrollArea *GxsChannelPostsWidget::getScrollArea()
|
|
|
|
{
|
|
|
|
return ui->scrollArea;
|
|
|
|
}
|
|
|
|
|
|
|
|
void GxsChannelPostsWidget::deleteFeedItem(QWidget * /*item*/, uint32_t /*type*/)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void GxsChannelPostsWidget::openChat(const RsPeerId & /*peerId*/)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// Callback from Widget->FeedHolder->ServiceDialog->CommentContainer->CommentDialog,
|
|
|
|
void GxsChannelPostsWidget::openComments(uint32_t /*type*/, const RsGxsGroupId &groupId, const RsGxsMessageId &msgId, const QString &title)
|
|
|
|
{
|
2014-05-07 20:00:21 -04:00
|
|
|
emit loadComment(groupId, msgId, title);
|
2014-05-04 18:59:06 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void GxsChannelPostsWidget::createMsg()
|
|
|
|
{
|
2014-07-23 14:51:56 -04:00
|
|
|
if (groupId().isNull()) {
|
2014-05-04 18:59:06 -04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2014-07-23 14:51:56 -04:00
|
|
|
if (!IS_GROUP_SUBSCRIBED(subscribeFlags())) {
|
2014-07-22 11:04:36 -04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2014-07-23 14:51:56 -04:00
|
|
|
CreateGxsChannelMsg *msgDialog = new CreateGxsChannelMsg(groupId());
|
2014-05-04 18:59:06 -04:00
|
|
|
msgDialog->show();
|
|
|
|
|
|
|
|
/* window will destroy itself! */
|
|
|
|
}
|
|
|
|
|
|
|
|
void GxsChannelPostsWidget::insertChannelDetails(const RsGxsChannelGroup &group)
|
|
|
|
{
|
|
|
|
/* IMAGE */
|
|
|
|
QPixmap chanImage;
|
|
|
|
if (group.mImage.mData != NULL) {
|
|
|
|
chanImage.loadFromData(group.mImage.mData, group.mImage.mSize, "PNG");
|
|
|
|
} else {
|
|
|
|
chanImage = QPixmap(CHAN_DEFAULT_IMAGE);
|
|
|
|
}
|
|
|
|
ui->logoLabel->setPixmap(chanImage);
|
|
|
|
|
2014-07-23 14:51:56 -04:00
|
|
|
if (group.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_PUBLISH)
|
2014-05-04 18:59:06 -04:00
|
|
|
{
|
|
|
|
mStateHelper->setWidgetEnabled(ui->postButton, true);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
mStateHelper->setWidgetEnabled(ui->postButton, false);
|
|
|
|
}
|
|
|
|
|
2014-07-23 14:51:56 -04:00
|
|
|
ui->subscribeToolButton->setSubscribed(IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags));
|
2014-07-05 14:33:11 -04:00
|
|
|
|
|
|
|
bool autoDownload = rsGxsChannels->getChannelAutoDownload(group.mMeta.mGroupId);
|
|
|
|
setAutoDownload(autoDownload);
|
2014-05-04 18:59:06 -04:00
|
|
|
}
|
|
|
|
|
2014-05-27 02:57:45 -04:00
|
|
|
void GxsChannelPostsWidget::filterChanged(int filter)
|
|
|
|
{
|
|
|
|
if (mInProcessSettings) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
filterItems(ui->filterLineEdit->text());
|
|
|
|
|
|
|
|
// save index
|
|
|
|
Settings->setValueToGroup("ChannelFeed", "filter", filter);
|
|
|
|
}
|
|
|
|
|
|
|
|
void GxsChannelPostsWidget::filterItems(const QString& text)
|
|
|
|
{
|
|
|
|
int filter = ui->filterLineEdit->currentFilter();
|
|
|
|
|
|
|
|
/* Search exisiting item */
|
2014-07-23 14:51:56 -04:00
|
|
|
QList<GxsFeedItem*>::iterator lit;
|
|
|
|
for (lit = mPostItems.begin(); lit != mPostItems.end(); lit++)
|
2014-05-27 02:57:45 -04:00
|
|
|
{
|
2014-07-23 14:51:56 -04:00
|
|
|
GxsChannelPostItem *item = dynamic_cast<GxsChannelPostItem*>(*lit);
|
|
|
|
if (!item) {
|
|
|
|
continue;
|
|
|
|
}
|
2014-05-27 02:57:45 -04:00
|
|
|
filterItem(item,text,filter);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bool GxsChannelPostsWidget::filterItem(GxsChannelPostItem *pItem, const QString &text, const int filter)
|
|
|
|
{
|
|
|
|
bool bVisible = text.isEmpty();
|
|
|
|
|
|
|
|
switch(filter)
|
|
|
|
{
|
|
|
|
case FILTER_TITLE:
|
|
|
|
bVisible=pItem->getTitleLabel().contains(text,Qt::CaseInsensitive);
|
|
|
|
break;
|
|
|
|
case FILTER_MSG:
|
|
|
|
bVisible=pItem->getMsgLabel().contains(text,Qt::CaseInsensitive);
|
|
|
|
break;
|
|
|
|
case FILTER_FILE_NAME:
|
|
|
|
{
|
|
|
|
std::list<SubFileItem *> fileItems=pItem->getFileItems();
|
|
|
|
std::list<SubFileItem *>::iterator lit;
|
|
|
|
for(lit = fileItems.begin(); lit != fileItems.end(); lit++)
|
|
|
|
{
|
|
|
|
SubFileItem *fi = *lit;
|
|
|
|
QString fileName=QString::fromUtf8(fi->FileName().c_str());
|
|
|
|
bVisible=(bVisible || fileName.contains(text,Qt::CaseInsensitive));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
bVisible=true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
pItem->setVisible(bVisible);
|
|
|
|
|
|
|
|
return (bVisible);
|
|
|
|
}
|
|
|
|
|
2014-07-23 14:51:56 -04:00
|
|
|
static bool sortChannelMsgSummaryAsc(const RsGxsChannelPost &msg1, const RsGxsChannelPost &msg2)
|
|
|
|
{
|
|
|
|
return (msg1.mMeta.mPublishTs > msg2.mMeta.mPublishTs);
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool sortChannelMsgSummaryDesc(const RsGxsChannelPost &msg1, const RsGxsChannelPost &msg2)
|
|
|
|
{
|
|
|
|
return (msg1.mMeta.mPublishTs < msg2.mMeta.mPublishTs);
|
|
|
|
}
|
|
|
|
|
2014-05-05 17:53:47 -04:00
|
|
|
void GxsChannelPostsWidget::insertChannelPosts(std::vector<RsGxsChannelPost> &posts, bool related)
|
2014-05-04 18:59:06 -04:00
|
|
|
{
|
|
|
|
std::vector<RsGxsChannelPost>::const_iterator it;
|
|
|
|
|
|
|
|
// Do these need sorting? probably.
|
|
|
|
// can we add that into the request?
|
2014-05-05 17:53:47 -04:00
|
|
|
if (related) {
|
|
|
|
/* Sort descending to add posts at top */
|
|
|
|
std::sort(posts.begin(), posts.end(), sortChannelMsgSummaryDesc);
|
|
|
|
} else {
|
|
|
|
std::sort(posts.begin(), posts.end(), sortChannelMsgSummaryAsc);
|
|
|
|
}
|
2014-05-04 18:59:06 -04:00
|
|
|
|
|
|
|
uint32_t subscribeFlags = 0xffffffff;
|
|
|
|
|
|
|
|
for (it = posts.begin(); it != posts.end(); it++)
|
|
|
|
{
|
2014-05-05 17:53:47 -04:00
|
|
|
GxsChannelPostItem *item = NULL;
|
|
|
|
if (related) {
|
2014-07-23 14:51:56 -04:00
|
|
|
foreach (GxsFeedItem *loopItem, mPostItems) {
|
2014-05-05 17:53:47 -04:00
|
|
|
if (loopItem->messageId() == it->mMeta.mMsgId) {
|
2014-07-23 14:51:56 -04:00
|
|
|
item = dynamic_cast<GxsChannelPostItem*>(loopItem);
|
2014-05-05 17:53:47 -04:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (item) {
|
2014-07-27 14:29:35 -04:00
|
|
|
item->setContent(*it);
|
2014-05-06 16:19:04 -04:00
|
|
|
//TODO: Sort timestamp
|
2014-05-05 17:53:47 -04:00
|
|
|
} else {
|
2014-05-06 16:19:04 -04:00
|
|
|
item = new GxsChannelPostItem(this, 0, *it, subscribeFlags, true, false);
|
2014-05-27 02:57:45 -04:00
|
|
|
if (!ui->filterLineEdit->text().isEmpty())
|
|
|
|
filterItem(item, ui->filterLineEdit->text(), ui->filterLineEdit->currentFilter());
|
|
|
|
|
2014-07-23 14:51:56 -04:00
|
|
|
mPostItems.push_back(item);
|
2014-05-05 17:53:47 -04:00
|
|
|
if (related) {
|
|
|
|
ui->verticalLayout->insertWidget(0, item);
|
|
|
|
} else {
|
|
|
|
ui->verticalLayout->addWidget(item);
|
|
|
|
}
|
|
|
|
}
|
2014-05-04 18:59:06 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-05 14:33:11 -04:00
|
|
|
void GxsChannelPostsWidget::subscribeGroup(bool subscribe)
|
2014-05-04 18:59:06 -04:00
|
|
|
{
|
2014-07-23 14:51:56 -04:00
|
|
|
if (groupId().isNull()) {
|
2014-07-05 14:33:11 -04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
uint32_t token;
|
2014-07-23 14:51:56 -04:00
|
|
|
rsGxsChannels->subscribeToGroup(token, groupId(), subscribe);
|
2014-07-05 14:33:11 -04:00
|
|
|
// mChannelQueue->queueRequest(token, 0, RS_TOKREQ_ANSTYPE_ACK, TOKEN_TYPE_SUBSCRIBE_CHANGE);
|
|
|
|
}
|
|
|
|
|
|
|
|
void GxsChannelPostsWidget::setAutoDownload(bool autoDl)
|
|
|
|
{
|
|
|
|
mAutoDownloadAction->setChecked(autoDl);
|
|
|
|
mAutoDownloadAction->setText(autoDl ? tr("Disable Auto-Download") : tr("Enable Auto-Download"));
|
|
|
|
}
|
|
|
|
|
|
|
|
void GxsChannelPostsWidget::toggleAutoDownload()
|
|
|
|
{
|
|
|
|
RsGxsGroupId grpId = groupId();
|
|
|
|
if (grpId.isNull()) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool autoDownload = rsGxsChannels->getChannelAutoDownload(grpId);
|
|
|
|
if (!rsGxsChannels->setChannelAutoDownload(grpId, !autoDownload))
|
|
|
|
{
|
|
|
|
std::cerr << "GxsChannelDialog::toggleAutoDownload() Auto Download failed to set";
|
|
|
|
std::cerr << std::endl;
|
2014-05-04 18:59:06 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-23 14:51:56 -04:00
|
|
|
bool GxsChannelPostsWidget::insertGroupData(const uint32_t &token, RsGroupMetaData &metaData)
|
2014-05-05 17:53:47 -04:00
|
|
|
{
|
2014-05-04 18:59:06 -04:00
|
|
|
std::vector<RsGxsChannelGroup> groups;
|
|
|
|
rsGxsChannels->getGroupData(token, groups);
|
|
|
|
|
|
|
|
if (groups.size() == 1)
|
|
|
|
{
|
|
|
|
insertChannelDetails(groups[0]);
|
2014-07-23 14:51:56 -04:00
|
|
|
metaData = groups[0].mMeta;
|
|
|
|
return true;
|
2014-05-04 18:59:06 -04:00
|
|
|
}
|
|
|
|
|
2014-07-23 14:51:56 -04:00
|
|
|
return false;
|
2014-05-04 18:59:06 -04:00
|
|
|
}
|
|
|
|
|
2014-07-23 14:51:56 -04:00
|
|
|
void GxsChannelPostsWidget::insertPosts(const uint32_t &token)
|
2014-05-04 18:59:06 -04:00
|
|
|
{
|
|
|
|
std::vector<RsGxsChannelPost> posts;
|
|
|
|
rsGxsChannels->getPostData(token, posts);
|
|
|
|
|
2014-05-05 17:53:47 -04:00
|
|
|
insertChannelPosts(posts, false);
|
|
|
|
}
|
|
|
|
|
2014-07-23 14:51:56 -04:00
|
|
|
void GxsChannelPostsWidget::insertRelatedPosts(const uint32_t &token)
|
2014-05-05 17:53:47 -04:00
|
|
|
{
|
|
|
|
std::vector<RsGxsChannelPost> posts;
|
|
|
|
rsGxsChannels->getRelatedPosts(token, posts);
|
|
|
|
|
|
|
|
insertChannelPosts(posts, true);
|
2014-05-04 18:59:06 -04:00
|
|
|
}
|
|
|
|
|
2014-07-23 14:51:56 -04:00
|
|
|
void GxsChannelPostsWidget::setMessageRead(GxsFeedItem *item, bool read)
|
2014-05-04 18:59:06 -04:00
|
|
|
{
|
2014-07-23 14:51:56 -04:00
|
|
|
RsGxsGrpMsgIdPair msgPair = std::make_pair(item->groupId(), item->messageId());
|
2014-05-04 18:59:06 -04:00
|
|
|
|
2014-07-23 14:51:56 -04:00
|
|
|
uint32_t token;
|
|
|
|
rsGxsChannels->setMessageReadStatus(token, msgPair, read);
|
2014-05-04 18:59:06 -04:00
|
|
|
}
|