keep current voter ID as poster ID in comment dialog

This commit is contained in:
csoler 2020-10-01 21:25:32 +02:00
parent 5e2f46a5fc
commit 6cc9cdf130
8 changed files with 20 additions and 17 deletions

View file

@ -686,8 +686,11 @@ void PostedListWidgetWithModel::openComments(const RsGxsMessageId& msgId)
if(!index.isValid())
return;
RsGxsId current_author;
ui->idChooser->getChosenId(current_author);
RsPostedPost post = index.data(Qt::UserRole).value<RsPostedPost>() ;
auto *commentDialog = new GxsCommentDialog(this,rsPosted->getTokenService(),rsPosted);
auto *commentDialog = new GxsCommentDialog(this,current_author,rsPosted->getTokenService(),rsPosted);
std::set<RsGxsMessageId> msg_versions({post.mMeta.mMsgId});
commentDialog->commentLoad(post.mMeta.mGroupId, msg_versions, post.mMeta.mMsgId);