mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
Recommiting from old repo:
commit msg from last: Fixed minor bug in group creation msg now set to unread and unprocessed on creation (added read flag in gxsflags.h also) Got topic and post generation working Additional changes: Voting update now working git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5951 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
0c49fba4d8
commit
6527aaf2d8
8 changed files with 323 additions and 215 deletions
|
@ -55,7 +55,12 @@ PostedItem::PostedItem(PostedHolder *postHolder, const RsPostedPost &post)
|
|||
"><span style=\" text-decoration: underline; color:#0000ff;\">" +
|
||||
QString::fromStdString(post.mLink) + "</span></a>");
|
||||
|
||||
scoreLabel->setText(QString("1"));
|
||||
uint32_t up, down, nComments;
|
||||
|
||||
rsPosted->retrieveScores(mPost.mMeta.mServiceString, up, down, nComments);
|
||||
|
||||
int32_t vote = up - down;
|
||||
scoreLabel->setText(QString::number(vote));
|
||||
|
||||
connect( commentButton, SIGNAL( clicked() ), this, SLOT( loadComments() ) );
|
||||
connect( voteUpButton, SIGNAL(clicked()), this, SLOT(makeUpVote()));
|
||||
|
@ -72,16 +77,16 @@ RsPostedPost PostedItem::getPost() const
|
|||
void PostedItem::makeDownVote()
|
||||
{
|
||||
RsGxsGrpMsgIdPair msgId;
|
||||
msgId.first = mPost.mMeta.mMsgId;
|
||||
msgId.second = mPost.mMeta.mGroupId;
|
||||
msgId.first = mPost.mMeta.mGroupId;
|
||||
msgId.second = mPost.mMeta.mMsgId;
|
||||
emit vote(msgId, false);
|
||||
}
|
||||
|
||||
void PostedItem::makeUpVote()
|
||||
{
|
||||
RsGxsGrpMsgIdPair msgId;
|
||||
msgId.first = mPost.mMeta.mMsgId;
|
||||
msgId.second = mPost.mMeta.mGroupId;
|
||||
msgId.first = mPost.mMeta.mGroupId;
|
||||
msgId.second = mPost.mMeta.mMsgId;
|
||||
emit vote(msgId, true);
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ border-radius: 10px}</string>
|
|||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue