2012-07-01 19:05:03 -04:00
|
|
|
/*
|
|
|
|
* Retroshare Posted Plugin.
|
|
|
|
*
|
|
|
|
* Copyright 2012-2012 by Robert Fernie.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License Version 2.1 as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This library 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
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
|
* USA.
|
|
|
|
*
|
|
|
|
* Please report all bugs and problems to "retroshare@lunamutt.com".
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <QDateTime>
|
|
|
|
|
2014-10-12 13:22:21 -04:00
|
|
|
#include "rshare.h"
|
2012-07-01 19:05:03 -04:00
|
|
|
#include "PostedItem.h"
|
2013-07-15 14:39:39 -04:00
|
|
|
#include "gui/feeds/FeedHolder.h"
|
2014-10-12 13:22:21 -04:00
|
|
|
#include "ui_PostedItem.h"
|
2012-07-01 19:05:03 -04:00
|
|
|
|
2012-10-21 15:45:35 -04:00
|
|
|
#include <retroshare/rsposted.h>
|
2012-07-01 19:05:03 -04:00
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
2014-10-12 13:22:21 -04:00
|
|
|
#define COLOR_NORMAL QColor(248, 248, 248)
|
|
|
|
#define COLOR_NEW QColor(220, 236, 253)
|
|
|
|
|
2012-07-01 19:05:03 -04:00
|
|
|
/** Constructor */
|
2013-03-15 17:02:43 -04:00
|
|
|
|
2014-11-20 19:50:18 -05:00
|
|
|
PostedItem::PostedItem(FeedHolder *feedHolder, uint32_t feedId, const RsGxsGroupId &groupId, const RsGxsMessageId &messageId, bool isHome, bool autoUpdate) :
|
|
|
|
GxsFeedItem(feedHolder, feedId, groupId, messageId, isHome, rsPosted, autoUpdate)
|
2012-07-01 19:05:03 -04:00
|
|
|
{
|
2013-03-15 17:02:43 -04:00
|
|
|
setup();
|
2014-11-17 19:49:21 -05:00
|
|
|
|
|
|
|
requestGroup();
|
|
|
|
requestMessage();
|
|
|
|
}
|
|
|
|
|
2014-11-20 19:50:18 -05:00
|
|
|
PostedItem::PostedItem(FeedHolder *feedHolder, uint32_t feedId, const RsPostedGroup &group, const RsPostedPost &post, bool isHome, bool autoUpdate) :
|
|
|
|
GxsFeedItem(feedHolder, feedId, post.mMeta.mGroupId, post.mMeta.mMsgId, isHome, rsPosted, autoUpdate)
|
2014-11-17 19:49:21 -05:00
|
|
|
{
|
|
|
|
setup();
|
|
|
|
|
|
|
|
setGroup(group, false);
|
|
|
|
setPost(post);
|
2013-03-15 17:02:43 -04:00
|
|
|
}
|
2012-07-01 19:05:03 -04:00
|
|
|
|
2014-11-20 19:50:18 -05:00
|
|
|
PostedItem::PostedItem(FeedHolder *feedHolder, uint32_t feedId, const RsPostedPost &post, bool isHome, bool autoUpdate) :
|
|
|
|
GxsFeedItem(feedHolder, feedId, post.mMeta.mGroupId, post.mMeta.mMsgId, isHome, rsPosted, autoUpdate)
|
2013-03-15 17:02:43 -04:00
|
|
|
{
|
|
|
|
setup();
|
|
|
|
|
2014-11-17 19:49:21 -05:00
|
|
|
requestGroup();
|
|
|
|
setPost(post);
|
|
|
|
}
|
|
|
|
|
|
|
|
PostedItem::~PostedItem()
|
|
|
|
{
|
|
|
|
delete(ui);
|
2013-03-15 17:02:43 -04:00
|
|
|
}
|
2012-12-09 17:38:49 -05:00
|
|
|
|
2013-03-15 17:02:43 -04:00
|
|
|
void PostedItem::setup()
|
|
|
|
{
|
2014-10-12 13:22:21 -04:00
|
|
|
/* Invoke the Qt Designer generated object setup routine */
|
|
|
|
ui = new Ui::PostedItem;
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
2013-07-15 14:39:39 -04:00
|
|
|
setAttribute(Qt::WA_DeleteOnClose, true);
|
2013-03-15 17:02:43 -04:00
|
|
|
|
2014-11-17 19:49:21 -05:00
|
|
|
mInFill = false;
|
|
|
|
|
|
|
|
/* clear ui */
|
|
|
|
ui->titleLabel->setText(tr("Loading"));
|
|
|
|
ui->dateLabel->clear();
|
|
|
|
ui->fromLabel->clear();
|
|
|
|
ui->siteLabel->clear();
|
|
|
|
|
2014-11-20 19:50:18 -05:00
|
|
|
/* general ones */
|
|
|
|
connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(removeItem()));
|
|
|
|
|
|
|
|
/* specific */
|
|
|
|
connect(ui->readAndClearButton, SIGNAL(clicked()), this, SLOT(readAndClearItem()));
|
|
|
|
|
2014-10-12 13:22:21 -04:00
|
|
|
connect(ui->commentButton, SIGNAL( clicked()), this, SLOT(loadComments()));
|
|
|
|
connect(ui->voteUpButton, SIGNAL(clicked()), this, SLOT(makeUpVote()));
|
|
|
|
connect(ui->voteDownButton, SIGNAL(clicked()), this, SLOT( makeDownVote()));
|
|
|
|
|
|
|
|
connect(ui->readButton, SIGNAL(toggled(bool)), this, SLOT(readToggled(bool)));
|
2014-11-20 19:50:18 -05:00
|
|
|
|
|
|
|
ui->clearButton->hide();
|
|
|
|
ui->readAndClearButton->hide();
|
|
|
|
|
|
|
|
ui->frame_notes->hide();
|
2012-12-09 17:38:49 -05:00
|
|
|
}
|
|
|
|
|
2014-11-17 19:49:21 -05:00
|
|
|
bool PostedItem::setGroup(const RsPostedGroup &group, bool doFill)
|
|
|
|
{
|
|
|
|
if (groupId() != group.mMeta.mGroupId) {
|
|
|
|
std::cerr << "PostedItem::setGroup() - Wrong id, cannot set post";
|
|
|
|
std::cerr << std::endl;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
mGroup = group;
|
|
|
|
|
|
|
|
if (doFill) {
|
|
|
|
fill();
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool PostedItem::setPost(const RsPostedPost &post, bool doFill)
|
|
|
|
{
|
|
|
|
if (groupId() != post.mMeta.mGroupId || messageId() != post.mMeta.mMsgId) {
|
|
|
|
std::cerr << "PostedItem::setPost() - Wrong id, cannot set post";
|
|
|
|
std::cerr << std::endl;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
mPost = post;
|
|
|
|
|
|
|
|
if (doFill) {
|
|
|
|
fill();
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void PostedItem::loadGroup(const uint32_t &token)
|
|
|
|
{
|
|
|
|
std::vector<RsPostedGroup> groups;
|
|
|
|
if (!rsPosted->getGroupData(token, groups))
|
|
|
|
{
|
|
|
|
std::cerr << "PostedItem::loadGroup() ERROR getting data";
|
|
|
|
std::cerr << std::endl;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (groups.size() != 1)
|
|
|
|
{
|
|
|
|
std::cerr << "PostedItem::loadGroup() Wrong number of Items";
|
|
|
|
std::cerr << std::endl;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
setGroup(groups[0]);
|
|
|
|
}
|
|
|
|
|
2013-03-15 17:02:43 -04:00
|
|
|
void PostedItem::loadMessage(const uint32_t &token)
|
|
|
|
{
|
|
|
|
std::vector<RsPostedPost> posts;
|
2013-07-15 14:39:39 -04:00
|
|
|
if (!rsPosted->getPostData(token, posts))
|
|
|
|
{
|
|
|
|
std::cerr << "GxsChannelPostItem::loadMessage() ERROR getting data";
|
|
|
|
std::cerr << std::endl;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (posts.size() != 1)
|
|
|
|
{
|
|
|
|
std::cerr << "GxsChannelPostItem::loadMessage() Wrong number of Items";
|
|
|
|
std::cerr << std::endl;
|
|
|
|
return;
|
|
|
|
}
|
2013-03-15 17:02:43 -04:00
|
|
|
|
2014-11-17 19:49:21 -05:00
|
|
|
setPost(posts[0]);
|
2013-03-15 17:02:43 -04:00
|
|
|
}
|
|
|
|
|
2014-11-17 19:49:21 -05:00
|
|
|
void PostedItem::fill()
|
2014-07-27 14:29:35 -04:00
|
|
|
{
|
2014-11-17 19:49:21 -05:00
|
|
|
if (isLoading()) {
|
|
|
|
/* Wait for all requests */
|
2014-07-27 14:29:35 -04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2014-11-17 19:49:21 -05:00
|
|
|
mInFill = true;
|
2013-07-15 14:39:39 -04:00
|
|
|
|
2013-03-15 17:02:43 -04:00
|
|
|
QDateTime qtime;
|
|
|
|
qtime.setTime_t(mPost.mMeta.mPublishTs);
|
2015-02-23 07:28:20 -05:00
|
|
|
QString timestamp = qtime.toString("hh:mm dd-MMM-yyyy");
|
2014-10-12 13:22:21 -04:00
|
|
|
ui->dateLabel->setText(timestamp);
|
2014-11-17 19:49:21 -05:00
|
|
|
ui->fromLabel->setId(mPost.mMeta.mAuthorId);
|
2015-02-23 07:28:20 -05:00
|
|
|
|
|
|
|
// Use QUrl to check/parse our URL
|
|
|
|
QUrl url(QString::fromStdString(mPost.mLink));
|
|
|
|
QString urlstr = "Invalid Link";
|
|
|
|
QString sitestr = "Invalid Link";
|
|
|
|
bool urlOkay = url.isValid();
|
|
|
|
if (urlOkay)
|
|
|
|
{
|
|
|
|
QString scheme = url.scheme();
|
|
|
|
if ((scheme != "https")
|
|
|
|
&& (scheme != "http")
|
|
|
|
&& (scheme != "ftp"))
|
|
|
|
{
|
|
|
|
urlOkay = false;
|
|
|
|
sitestr = "Invalid Link Scheme";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (urlOkay)
|
|
|
|
{
|
|
|
|
urlstr = QString("<a href=\"%1\" ><span style=\" text-decoration: underline; color:#2255AA;\"> %2 </span></a>").arg(url.toString()).arg(messageName());
|
|
|
|
|
|
|
|
QString siteurl = url.scheme() + "://" + url.host();
|
|
|
|
sitestr = QString("<a href=\"%1\" ><span style=\" text-decoration: underline; color:#2255AA;\"> %2 </span></a>").arg(siteurl).arg(siteurl);
|
|
|
|
}
|
|
|
|
|
|
|
|
ui->titleLabel->setText(urlstr);
|
|
|
|
ui->siteLabel->setText(sitestr);
|
2013-03-15 17:02:43 -04:00
|
|
|
|
2013-06-04 17:00:43 -04:00
|
|
|
//QString score = "Hot" + QString::number(post.mHotScore);
|
|
|
|
//score += " Top" + QString::number(post.mTopScore);
|
|
|
|
//score += " New" + QString::number(post.mNewScore);
|
|
|
|
|
2014-11-17 19:49:21 -05:00
|
|
|
QString score = QString::number(mPost.mTopScore);
|
2013-06-04 17:00:43 -04:00
|
|
|
|
2014-10-12 13:22:21 -04:00
|
|
|
ui->scoreLabel->setText(score);
|
2013-06-04 17:00:43 -04:00
|
|
|
|
|
|
|
// FIX THIS UP LATER.
|
2014-11-17 19:49:21 -05:00
|
|
|
ui->notes->setText(QString::fromUtf8(mPost.mNotes.c_str()));
|
2013-06-04 17:00:43 -04:00
|
|
|
// differences between Feed or Top of Comment.
|
2014-08-01 10:49:58 -04:00
|
|
|
if (mFeedHolder)
|
2013-06-04 17:00:43 -04:00
|
|
|
{
|
|
|
|
// feed.
|
2014-10-12 13:22:21 -04:00
|
|
|
ui->frame_notes->hide();
|
2013-06-04 17:00:43 -04:00
|
|
|
//frame_comment->show();
|
2014-10-12 13:22:21 -04:00
|
|
|
ui->commentButton->show();
|
2013-06-04 17:00:43 -04:00
|
|
|
|
2014-11-17 19:49:21 -05:00
|
|
|
if (mPost.mComments)
|
2013-06-04 17:00:43 -04:00
|
|
|
{
|
2014-11-17 19:49:21 -05:00
|
|
|
QString commentText = QString::number(mPost.mComments);
|
2013-06-04 17:00:43 -04:00
|
|
|
commentText += " ";
|
|
|
|
commentText += tr("Comments");
|
2014-10-12 13:22:21 -04:00
|
|
|
ui->commentButton->setText(commentText);
|
2013-06-04 17:00:43 -04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-10-12 13:22:21 -04:00
|
|
|
ui->commentButton->setText(tr("Comment"));
|
2013-06-04 17:00:43 -04:00
|
|
|
}
|
2014-10-12 13:22:21 -04:00
|
|
|
|
2014-11-17 19:49:21 -05:00
|
|
|
setReadStatus(IS_MSG_NEW(mPost.mMeta.mMsgStatus), IS_MSG_UNREAD(mPost.mMeta.mMsgStatus) || IS_MSG_NEW(mPost.mMeta.mMsgStatus));
|
2013-06-04 17:00:43 -04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// no feed.
|
2014-10-12 13:22:21 -04:00
|
|
|
if(ui->notes->text().isEmpty())
|
|
|
|
{
|
|
|
|
ui->frame_notes->hide();
|
2014-01-12 09:53:57 -05:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-10-12 13:22:21 -04:00
|
|
|
ui->frame_notes->show();
|
2014-01-12 09:53:57 -05:00
|
|
|
}
|
2013-06-04 17:00:43 -04:00
|
|
|
//frame_comment->hide();
|
2014-10-12 13:22:21 -04:00
|
|
|
ui->commentButton->hide();
|
|
|
|
|
|
|
|
ui->readButton->hide();
|
|
|
|
ui->newLabel->hide();
|
2013-06-04 17:00:43 -04:00
|
|
|
}
|
|
|
|
|
2014-11-20 19:50:18 -05:00
|
|
|
if (mIsHome)
|
|
|
|
{
|
|
|
|
ui->clearButton->hide();
|
|
|
|
ui->readAndClearButton->hide();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ui->clearButton->show();
|
|
|
|
ui->readAndClearButton->show();
|
|
|
|
}
|
|
|
|
|
2013-06-04 17:00:43 -04:00
|
|
|
// disable voting buttons - if they have already voted.
|
2014-11-17 19:49:21 -05:00
|
|
|
if (mPost.mMeta.mMsgStatus & GXS_SERV::GXS_MSG_STATUS_VOTE_MASK)
|
2013-06-04 17:00:43 -04:00
|
|
|
{
|
2014-10-12 13:22:21 -04:00
|
|
|
ui->voteUpButton->setEnabled(false);
|
|
|
|
ui->voteDownButton->setEnabled(false);
|
2013-06-04 17:00:43 -04:00
|
|
|
}
|
|
|
|
|
2013-03-15 17:02:43 -04:00
|
|
|
uint32_t up, down, nComments;
|
2012-12-08 16:50:13 -05:00
|
|
|
|
2013-03-11 16:53:15 -04:00
|
|
|
#if 0
|
2013-03-15 17:02:43 -04:00
|
|
|
bool ok = rsPosted->retrieveScores(mPost.mMeta.mServiceString, up, down, nComments);
|
|
|
|
|
|
|
|
if(ok)
|
|
|
|
{
|
|
|
|
int32_t vote = up - down;
|
|
|
|
scoreLabel->setText(QString::number(vote));
|
|
|
|
|
|
|
|
numCommentsLabel->setText("<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px;"
|
|
|
|
"margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span"
|
|
|
|
"style=\" font-size:10pt; font-weight:600;\">#</span><span "
|
|
|
|
"style=\" font-size:8pt; font-weight:600;\"> Comments: "
|
|
|
|
+ QString::number(nComments) + "</span></p>");
|
|
|
|
}
|
2013-03-11 16:53:15 -04:00
|
|
|
#endif
|
2014-10-12 13:22:21 -04:00
|
|
|
|
2014-11-17 19:49:21 -05:00
|
|
|
mInFill = false;
|
2014-11-20 19:50:18 -05:00
|
|
|
|
|
|
|
emit sizeChanged(this);
|
2013-07-15 14:39:39 -04:00
|
|
|
}
|
2012-07-31 21:47:53 -04:00
|
|
|
|
2013-07-15 14:39:39 -04:00
|
|
|
const RsPostedPost &PostedItem::getPost() const
|
|
|
|
{
|
|
|
|
return mPost;
|
2012-07-01 19:05:03 -04:00
|
|
|
}
|
|
|
|
|
2013-07-15 14:39:39 -04:00
|
|
|
RsPostedPost &PostedItem::post()
|
2012-11-22 17:40:31 -05:00
|
|
|
{
|
2013-03-15 17:02:43 -04:00
|
|
|
return mPost;
|
2012-11-22 17:40:31 -05:00
|
|
|
}
|
2012-07-01 19:05:03 -04:00
|
|
|
|
2014-11-17 19:49:21 -05:00
|
|
|
QString PostedItem::groupName()
|
|
|
|
{
|
|
|
|
return QString::fromUtf8(mGroup.mMeta.mGroupName.c_str());
|
|
|
|
}
|
|
|
|
|
2014-07-26 19:52:45 -04:00
|
|
|
QString PostedItem::messageName()
|
|
|
|
{
|
|
|
|
return QString::fromUtf8(mPost.mMeta.mMsgName.c_str());
|
|
|
|
}
|
|
|
|
|
2012-12-05 17:45:44 -05:00
|
|
|
void PostedItem::makeDownVote()
|
|
|
|
{
|
2013-03-15 17:02:43 -04:00
|
|
|
RsGxsGrpMsgIdPair msgId;
|
|
|
|
msgId.first = mPost.mMeta.mGroupId;
|
|
|
|
msgId.second = mPost.mMeta.mMsgId;
|
2013-06-04 17:00:43 -04:00
|
|
|
|
2014-10-12 13:22:21 -04:00
|
|
|
ui->voteUpButton->setEnabled(false);
|
|
|
|
ui->voteDownButton->setEnabled(false);
|
2013-07-15 14:39:39 -04:00
|
|
|
|
2013-03-15 17:02:43 -04:00
|
|
|
emit vote(msgId, false);
|
2012-12-05 17:45:44 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void PostedItem::makeUpVote()
|
|
|
|
{
|
2013-03-15 17:02:43 -04:00
|
|
|
RsGxsGrpMsgIdPair msgId;
|
|
|
|
msgId.first = mPost.mMeta.mGroupId;
|
|
|
|
msgId.second = mPost.mMeta.mMsgId;
|
2013-06-04 17:00:43 -04:00
|
|
|
|
2014-10-12 13:22:21 -04:00
|
|
|
ui->voteUpButton->setEnabled(false);
|
|
|
|
ui->voteDownButton->setEnabled(false);
|
2013-06-04 17:00:43 -04:00
|
|
|
|
2013-03-15 17:02:43 -04:00
|
|
|
emit vote(msgId, true);
|
2012-12-05 17:45:44 -05:00
|
|
|
}
|
|
|
|
|
2012-07-31 21:47:53 -04:00
|
|
|
void PostedItem::loadComments()
|
|
|
|
{
|
2013-03-15 17:02:43 -04:00
|
|
|
std::cerr << "PostedItem::loadComments()";
|
|
|
|
std::cerr << std::endl;
|
2014-08-01 10:49:58 -04:00
|
|
|
|
|
|
|
if (mFeedHolder)
|
2013-03-15 17:02:43 -04:00
|
|
|
{
|
|
|
|
QString title = QString::fromUtf8(mPost.mMeta.mMsgName.c_str());
|
2014-08-01 10:49:58 -04:00
|
|
|
mFeedHolder->openComments(0, mPost.mMeta.mGroupId, mPost.mMeta.mMsgId, title);
|
2013-03-15 17:02:43 -04:00
|
|
|
}
|
2012-07-31 21:47:53 -04:00
|
|
|
}
|
2014-10-12 13:22:21 -04:00
|
|
|
|
|
|
|
void PostedItem::setReadStatus(bool isNew, bool isUnread)
|
|
|
|
{
|
|
|
|
if (isUnread)
|
|
|
|
{
|
|
|
|
ui->readButton->setChecked(true);
|
|
|
|
ui->readButton->setIcon(QIcon(":/images/message-state-unread.png"));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ui->readButton->setChecked(false);
|
|
|
|
ui->readButton->setIcon(QIcon(":/images/message-state-read.png"));
|
|
|
|
}
|
|
|
|
|
|
|
|
ui->newLabel->setVisible(isNew);
|
|
|
|
|
|
|
|
/* unpolish widget to clear the stylesheet's palette cache */
|
|
|
|
ui->frame->style()->unpolish(ui->frame);
|
|
|
|
|
|
|
|
QPalette palette = ui->frame->palette();
|
|
|
|
palette.setColor(ui->frame->backgroundRole(), isNew ? COLOR_NEW : COLOR_NORMAL); // QScrollArea
|
|
|
|
palette.setColor(QPalette::Base, isNew ? COLOR_NEW : COLOR_NORMAL); // QTreeWidget
|
|
|
|
ui->frame->setPalette(palette);
|
|
|
|
|
|
|
|
ui->frame->setProperty("new", isNew);
|
|
|
|
Rshare::refreshStyleSheet(ui->frame, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
void PostedItem::readToggled(bool checked)
|
|
|
|
{
|
2014-11-17 19:49:21 -05:00
|
|
|
if (mInFill) {
|
2014-10-12 13:22:21 -04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
RsGxsGrpMsgIdPair msgPair = std::make_pair(groupId(), messageId());
|
|
|
|
|
|
|
|
uint32_t token;
|
|
|
|
rsPosted->setMessageReadStatus(token, msgPair, !checked);
|
|
|
|
|
|
|
|
setReadStatus(false, checked);
|
|
|
|
}
|
2014-11-20 19:50:18 -05:00
|
|
|
|
|
|
|
void PostedItem::readAndClearItem()
|
|
|
|
{
|
|
|
|
#ifdef DEBUG_ITEM
|
|
|
|
std::cerr << "PostedItem::readAndClearItem()";
|
|
|
|
std::cerr << std::endl;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
readToggled(false);
|
|
|
|
removeItem();
|
|
|
|
}
|