mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-18 01:54:25 -05:00
fixed blocking API for votes
This commit is contained in:
parent
cf61cb3780
commit
54fd77822d
2 changed files with 24 additions and 32 deletions
|
|
@ -1204,7 +1204,12 @@ void PostedListWidgetWithModel::voteMsg(RsGxsGrpMsgIdPair msg,bool up_or_down)
|
|||
return;
|
||||
}
|
||||
|
||||
rsPosted->voteForPost(up_or_down,msg.first,msg.second,voter_id);
|
||||
RsGxsVoteType tvote = up_or_down?(RsGxsVoteType::UP):(RsGxsVoteType::DOWN);
|
||||
|
||||
std::string error_str;
|
||||
RsGxsMessageId vote_id;
|
||||
if(!rsPosted->voteForPost(msg.first,msg.second,voter_id,tvote,vote_id,error_str))
|
||||
QMessageBox::critical(nullptr,tr("Could not vote"), tr("Error occured while voting: ")+QString::fromStdString(error_str));
|
||||
}
|
||||
|
||||
#ifdef TODO
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue