mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-14 00:49:41 -05:00
Added read status to posted messages
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7600 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d3682337f0
commit
fbb177dd66
@ -86,7 +86,6 @@ void p3PostBase::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
|||||||
std::cerr << "p3PostBase::notifyChanges()";
|
std::cerr << "p3PostBase::notifyChanges()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
std::vector<RsGxsNotify *> changesForGUI;
|
|
||||||
std::vector<RsGxsNotify *>::iterator it;
|
std::vector<RsGxsNotify *>::iterator it;
|
||||||
|
|
||||||
for(it = changes.begin(); it != changes.end(); it++)
|
for(it = changes.begin(); it != changes.end(); it++)
|
||||||
@ -109,7 +108,6 @@ void p3PostBase::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
|||||||
// It could be taken a step further and directly request these msgs for an update.
|
// It could be taken a step further and directly request these msgs for an update.
|
||||||
addGroupForProcessing(mit->first);
|
addGroupForProcessing(mit->first);
|
||||||
}
|
}
|
||||||
delete msgChange;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* pass on Group Changes to GUI */
|
/* pass on Group Changes to GUI */
|
||||||
@ -125,11 +123,9 @@ void p3PostBase::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
|||||||
std::cerr << "p3PostBase::notifyChanges() Incoming Group: " << *git;
|
std::cerr << "p3PostBase::notifyChanges() Incoming Group: " << *git;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
}
|
}
|
||||||
changesForGUI.push_back(groupChange);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
changes.clear();
|
receiveHelperChanges(changes);
|
||||||
receiveHelperChanges(changesForGUI);
|
|
||||||
|
|
||||||
std::cerr << "p3PostBase::notifyChanges() -> receiveChanges()";
|
std::cerr << "p3PostBase::notifyChanges() -> receiveChanges()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
@ -514,12 +510,12 @@ void p3PostBase::background_loadMsgs(const uint32_t &token, bool unprocessed)
|
|||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* flag all messages as processed */
|
/* flag all messages as processed and new for the gui */
|
||||||
if ((*vit)->meta.mMsgStatus & GXS_SERV::GXS_MSG_STATUS_UNPROCESSED)
|
if ((*vit)->meta.mMsgStatus & GXS_SERV::GXS_MSG_STATUS_UNPROCESSED)
|
||||||
{
|
{
|
||||||
uint32_t token_a;
|
uint32_t token_a;
|
||||||
RsGxsGrpMsgIdPair msgId = std::make_pair(groupId, (*vit)->meta.mMsgId);
|
RsGxsGrpMsgIdPair msgId = std::make_pair(groupId, (*vit)->meta.mMsgId);
|
||||||
RsGenExchange::setMsgStatusFlags(token_a, msgId, 0, GXS_SERV::GXS_MSG_STATUS_UNPROCESSED);
|
RsGenExchange::setMsgStatusFlags(token_a, msgId, GXS_SERV::GXS_MSG_STATUS_GUI_NEW | GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD, GXS_SERV::GXS_MSG_STATUS_UNPROCESSED | GXS_SERV::GXS_MSG_STATUS_GUI_NEW | GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD);
|
||||||
}
|
}
|
||||||
delete(*vit);
|
delete(*vit);
|
||||||
}
|
}
|
||||||
|
@ -23,13 +23,18 @@
|
|||||||
|
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
|
|
||||||
|
#include "rshare.h"
|
||||||
#include "PostedItem.h"
|
#include "PostedItem.h"
|
||||||
#include "gui/feeds/FeedHolder.h"
|
#include "gui/feeds/FeedHolder.h"
|
||||||
|
#include "ui_PostedItem.h"
|
||||||
|
|
||||||
#include <retroshare/rsposted.h>
|
#include <retroshare/rsposted.h>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#define COLOR_NORMAL QColor(248, 248, 248)
|
||||||
|
#define COLOR_NEW QColor(220, 236, 253)
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
|
|
||||||
PostedItem::PostedItem(FeedHolder *feedHolder, uint32_t feedId, const RsGxsGroupId &groupId, const RsGxsMessageId &messageId, bool isHome) :
|
PostedItem::PostedItem(FeedHolder *feedHolder, uint32_t feedId, const RsGxsGroupId &groupId, const RsGxsMessageId &messageId, bool isHome) :
|
||||||
@ -49,12 +54,19 @@ PostedItem::PostedItem(FeedHolder *feedHolder, uint32_t feedId, const RsPostedPo
|
|||||||
|
|
||||||
void PostedItem::setup()
|
void PostedItem::setup()
|
||||||
{
|
{
|
||||||
setupUi(this);
|
/* Invoke the Qt Designer generated object setup routine */
|
||||||
|
ui = new Ui::PostedItem;
|
||||||
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
mInSetContent = false;
|
||||||
|
|
||||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||||
|
|
||||||
connect(commentButton, SIGNAL( clicked()), this, SLOT(loadComments()));
|
connect(ui->commentButton, SIGNAL( clicked()), this, SLOT(loadComments()));
|
||||||
connect(voteUpButton, SIGNAL(clicked()), this, SLOT(makeUpVote()));
|
connect(ui->voteUpButton, SIGNAL(clicked()), this, SLOT(makeUpVote()));
|
||||||
connect(voteDownButton, SIGNAL(clicked()), this, SLOT( makeDownVote()));
|
connect(ui->voteDownButton, SIGNAL(clicked()), this, SLOT( makeDownVote()));
|
||||||
|
|
||||||
|
connect(ui->readButton, SIGNAL(toggled(bool)), this, SLOT(readToggled(bool)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PostedItem::loadMessage(const uint32_t &token)
|
void PostedItem::loadMessage(const uint32_t &token)
|
||||||
@ -90,19 +102,21 @@ void PostedItem::setContent(const QVariant &content)
|
|||||||
|
|
||||||
void PostedItem::setContent(const RsPostedPost &post)
|
void PostedItem::setContent(const RsPostedPost &post)
|
||||||
{
|
{
|
||||||
|
mInSetContent = true;
|
||||||
|
|
||||||
mPost = post;
|
mPost = post;
|
||||||
|
|
||||||
QDateTime qtime;
|
QDateTime qtime;
|
||||||
qtime.setTime_t(mPost.mMeta.mPublishTs);
|
qtime.setTime_t(mPost.mMeta.mPublishTs);
|
||||||
QString timestamp = qtime.toString("dd.MMMM yyyy hh:mm");
|
QString timestamp = qtime.toString("dd.MMMM yyyy hh:mm");
|
||||||
dateLabel->setText(timestamp);
|
ui->dateLabel->setText(timestamp);
|
||||||
fromLabel->setId(post.mMeta.mAuthorId);
|
ui->fromLabel->setId(post.mMeta.mAuthorId);
|
||||||
titleLabel->setText("<a href=" + QString::fromStdString(post.mLink) +
|
ui->titleLabel->setText("<a href=" + QString::fromStdString(post.mLink) +
|
||||||
"><span style=\" text-decoration: underline; color:#2255AA;\">" +
|
"><span style=\" text-decoration: underline; color:#2255AA;\">" +
|
||||||
QString::fromStdString(post.mMeta.mMsgName) + "</span></a>");
|
QString::fromStdString(post.mMeta.mMsgName) + "</span></a>");
|
||||||
siteLabel->setText("<a href=" + QString::fromStdString(post.mLink) +
|
ui->siteLabel->setText("<a href=" + QString::fromStdString(post.mLink) +
|
||||||
"><span style=\" text-decoration: underline; color:#2255AA;\">" +
|
"><span style=\" text-decoration: underline; color:#2255AA;\">" +
|
||||||
QString::fromStdString(post.mLink) + "</span></a>");
|
QString::fromStdString(post.mLink) + "</span></a>");
|
||||||
|
|
||||||
//QString score = "Hot" + QString::number(post.mHotScore);
|
//QString score = "Hot" + QString::number(post.mHotScore);
|
||||||
//score += " Top" + QString::number(post.mTopScore);
|
//score += " Top" + QString::number(post.mTopScore);
|
||||||
@ -110,50 +124,55 @@ void PostedItem::setContent(const RsPostedPost &post)
|
|||||||
|
|
||||||
QString score = QString::number(post.mTopScore);
|
QString score = QString::number(post.mTopScore);
|
||||||
|
|
||||||
scoreLabel->setText(score);
|
ui->scoreLabel->setText(score);
|
||||||
|
|
||||||
// FIX THIS UP LATER.
|
// FIX THIS UP LATER.
|
||||||
notes->setText(QString::fromUtf8(post.mNotes.c_str()));
|
ui->notes->setText(QString::fromUtf8(post.mNotes.c_str()));
|
||||||
// differences between Feed or Top of Comment.
|
// differences between Feed or Top of Comment.
|
||||||
if (mFeedHolder)
|
if (mFeedHolder)
|
||||||
{
|
{
|
||||||
// feed.
|
// feed.
|
||||||
frame_notes->hide();
|
ui->frame_notes->hide();
|
||||||
//frame_comment->show();
|
//frame_comment->show();
|
||||||
commentButton->show();
|
ui->commentButton->show();
|
||||||
|
|
||||||
if (post.mComments)
|
if (post.mComments)
|
||||||
{
|
{
|
||||||
QString commentText = QString::number(post.mComments);
|
QString commentText = QString::number(post.mComments);
|
||||||
commentText += " ";
|
commentText += " ";
|
||||||
commentText += tr("Comments");
|
commentText += tr("Comments");
|
||||||
commentButton->setText(commentText);
|
ui->commentButton->setText(commentText);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
commentButton->setText(tr("Comment"));
|
ui->commentButton->setText(tr("Comment"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setReadStatus(IS_MSG_NEW(post.mMeta.mMsgStatus), IS_MSG_UNREAD(post.mMeta.mMsgStatus) || IS_MSG_NEW(post.mMeta.mMsgStatus));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// no feed.
|
// no feed.
|
||||||
if(notes->text().isEmpty())
|
if(ui->notes->text().isEmpty())
|
||||||
{
|
{
|
||||||
frame_notes->hide();
|
ui->frame_notes->hide();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
frame_notes->show();
|
ui->frame_notes->show();
|
||||||
}
|
}
|
||||||
//frame_comment->hide();
|
//frame_comment->hide();
|
||||||
commentButton->hide();
|
ui->commentButton->hide();
|
||||||
|
|
||||||
|
ui->readButton->hide();
|
||||||
|
ui->newLabel->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
// disable voting buttons - if they have already voted.
|
// disable voting buttons - if they have already voted.
|
||||||
if (post.mMeta.mMsgStatus & GXS_SERV::GXS_MSG_STATUS_VOTE_MASK)
|
if (post.mMeta.mMsgStatus & GXS_SERV::GXS_MSG_STATUS_VOTE_MASK)
|
||||||
{
|
{
|
||||||
voteUpButton->setEnabled(false);
|
ui->voteUpButton->setEnabled(false);
|
||||||
voteDownButton->setEnabled(false);
|
ui->voteDownButton->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t up, down, nComments;
|
uint32_t up, down, nComments;
|
||||||
@ -173,6 +192,8 @@ void PostedItem::setContent(const RsPostedPost &post)
|
|||||||
+ QString::number(nComments) + "</span></p>");
|
+ QString::number(nComments) + "</span></p>");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
mInSetContent = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const RsPostedPost &PostedItem::getPost() const
|
const RsPostedPost &PostedItem::getPost() const
|
||||||
@ -196,8 +217,8 @@ void PostedItem::makeDownVote()
|
|||||||
msgId.first = mPost.mMeta.mGroupId;
|
msgId.first = mPost.mMeta.mGroupId;
|
||||||
msgId.second = mPost.mMeta.mMsgId;
|
msgId.second = mPost.mMeta.mMsgId;
|
||||||
|
|
||||||
voteUpButton->setEnabled(false);
|
ui->voteUpButton->setEnabled(false);
|
||||||
voteDownButton->setEnabled(false);
|
ui->voteDownButton->setEnabled(false);
|
||||||
|
|
||||||
emit vote(msgId, false);
|
emit vote(msgId, false);
|
||||||
}
|
}
|
||||||
@ -208,8 +229,8 @@ void PostedItem::makeUpVote()
|
|||||||
msgId.first = mPost.mMeta.mGroupId;
|
msgId.first = mPost.mMeta.mGroupId;
|
||||||
msgId.second = mPost.mMeta.mMsgId;
|
msgId.second = mPost.mMeta.mMsgId;
|
||||||
|
|
||||||
voteUpButton->setEnabled(false);
|
ui->voteUpButton->setEnabled(false);
|
||||||
voteDownButton->setEnabled(false);
|
ui->voteDownButton->setEnabled(false);
|
||||||
|
|
||||||
emit vote(msgId, true);
|
emit vote(msgId, true);
|
||||||
}
|
}
|
||||||
@ -225,3 +246,44 @@ void PostedItem::loadComments()
|
|||||||
mFeedHolder->openComments(0, mPost.mMeta.mGroupId, mPost.mMeta.mMsgId, title);
|
mFeedHolder->openComments(0, mPost.mMeta.mGroupId, mPost.mMeta.mMsgId, title);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
if (mInSetContent) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
RsGxsGrpMsgIdPair msgPair = std::make_pair(groupId(), messageId());
|
||||||
|
|
||||||
|
uint32_t token;
|
||||||
|
rsPosted->setMessageReadStatus(token, msgPair, !checked);
|
||||||
|
|
||||||
|
setReadStatus(false, checked);
|
||||||
|
}
|
||||||
|
@ -26,14 +26,16 @@
|
|||||||
|
|
||||||
#include <QMetaType>
|
#include <QMetaType>
|
||||||
|
|
||||||
#include "ui_PostedItem.h"
|
|
||||||
|
|
||||||
#include <retroshare/rsposted.h>
|
#include <retroshare/rsposted.h>
|
||||||
#include "gui/gxs/GxsFeedItem.h"
|
#include "gui/gxs/GxsFeedItem.h"
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class PostedItem;
|
||||||
|
}
|
||||||
|
|
||||||
class RsPostedPost;
|
class RsPostedPost;
|
||||||
|
|
||||||
class PostedItem : public GxsFeedItem, private Ui::PostedItem
|
class PostedItem : public GxsFeedItem
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -53,6 +55,7 @@ private slots:
|
|||||||
void loadComments();
|
void loadComments();
|
||||||
void makeUpVote();
|
void makeUpVote();
|
||||||
void makeDownVote();
|
void makeDownVote();
|
||||||
|
void readToggled(bool checked);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void vote(const RsGxsGrpMsgIdPair& msgId, bool up);
|
void vote(const RsGxsGrpMsgIdPair& msgId, bool up);
|
||||||
@ -64,10 +67,16 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void setup();
|
void setup();
|
||||||
|
void setReadStatus(bool isNew, bool isUnread);
|
||||||
|
|
||||||
|
bool mInSetContent;
|
||||||
|
|
||||||
uint32_t mType;
|
uint32_t mType;
|
||||||
bool mSelected;
|
bool mSelected;
|
||||||
RsPostedPost mPost;
|
RsPostedPost mPost;
|
||||||
|
|
||||||
|
/** Qt Designer generated object */
|
||||||
|
Ui::PostedItem *ui;
|
||||||
};
|
};
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(RsPostedPost)
|
Q_DECLARE_METATYPE(RsPostedPost)
|
||||||
|
@ -43,6 +43,13 @@
|
|||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QLabel" name="newLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>New</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="0" column="0" rowspan="2">
|
<item row="0" column="0" rowspan="2">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
@ -105,43 +112,14 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1" colspan="8">
|
<item row="1" column="3">
|
||||||
<widget class="QLabel" name="titleLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>12</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>This is a very very very very loooooooooooooooonnnnnnnnnnnnnnnnng title don't you think? Yes it is and should wrap around I hope</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="openExternalLinks">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QPushButton" name="commentButton">
|
<widget class="QPushButton" name="commentButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Comments</string>
|
<string>Comments</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="1" column="4">
|
||||||
<widget class="QLabel" name="dateBoldLabel">
|
<widget class="QLabel" name="dateBoldLabel">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
@ -161,7 +139,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="3">
|
<item row="1" column="5">
|
||||||
<widget class="QLabel" name="dateLabel">
|
<widget class="QLabel" name="dateLabel">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
@ -182,7 +160,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="4">
|
<item row="1" column="6">
|
||||||
<widget class="QLabel" name="fromBoldLabel">
|
<widget class="QLabel" name="fromBoldLabel">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
@ -202,7 +180,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="5">
|
<item row="1" column="7">
|
||||||
<widget class="GxsIdLabel" name="fromLabel">
|
<widget class="GxsIdLabel" name="fromLabel">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
@ -223,7 +201,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="6">
|
<item row="1" column="8">
|
||||||
<widget class="QLabel" name="fromBoldLabel_2">
|
<widget class="QLabel" name="fromBoldLabel_2">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
@ -243,7 +221,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="7">
|
<item row="1" column="9">
|
||||||
<widget class="QLabel" name="siteLabel">
|
<widget class="QLabel" name="siteLabel">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
@ -264,7 +242,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="8">
|
<item row="1" column="10">
|
||||||
<spacer name="horizontalSpacer">
|
<spacer name="horizontalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
@ -277,6 +255,64 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QPushButton" name="readButton">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Toggle Message Read Status</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../images.qrc">
|
||||||
|
<normaloff>:/images/message-state-unread.png</normaloff>:/images/message-state-unread.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1" colspan="10">
|
||||||
|
<widget class="QLabel" name="titleLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">This is a very very very very loooooooooooooooonnnnnnnnnnnnnnnnng title don't you think? Yes it is and should wrap around I hope</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -65,7 +65,6 @@ GxsChannelPostItem::GxsChannelPostItem(FeedHolder *feedHolder, uint32_t feedId,
|
|||||||
|
|
||||||
mMode = DATA_PROVIDED;
|
mMode = DATA_PROVIDED;
|
||||||
mGroupMeta.mSubscribeFlags = subFlags;
|
mGroupMeta.mSubscribeFlags = subFlags;
|
||||||
mInUpdateItemStatic = false;
|
|
||||||
|
|
||||||
setup();
|
setup();
|
||||||
|
|
||||||
|
@ -1390,9 +1390,9 @@ void GxsForumThreadWidget::setMsgReadStatus(QList<QTreeWidgetItem*> &rows, bool
|
|||||||
|
|
||||||
uint32_t status = (*row)->data(COLUMN_THREAD_DATA, ROLE_THREAD_STATUS).toUInt();
|
uint32_t status = (*row)->data(COLUMN_THREAD_DATA, ROLE_THREAD_STATUS).toUInt();
|
||||||
|
|
||||||
uint32_t statusNew = (status & ~(GXS_SERV::GXS_MSG_STATUS_GUI_NEW | GXS_SERV::GXS_MSG_STATUS_GUI_USER_UNREAD)); // orig status, without UNREAD and UNPROCESSED.
|
uint32_t statusNew = (status & ~(GXS_SERV::GXS_MSG_STATUS_GUI_NEW | GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD)); // orig status, without NEW AND UNREAD
|
||||||
if (!read) {
|
if (!read) {
|
||||||
statusNew |= GXS_SERV::GXS_MSG_STATUS_GUI_USER_UNREAD;
|
statusNew |= GXS_SERV::GXS_MSG_STATUS_GUI_UNREAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status != statusNew) // is it different?
|
if (status != statusNew) // is it different?
|
||||||
|
Loading…
Reference in New Issue
Block a user