fixed blocking API for votes

This commit is contained in:
csoler 2022-06-30 14:43:04 +02:00
parent cf61cb3780
commit 54fd77822d
2 changed files with 24 additions and 32 deletions

View file

@ -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