Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
929 views
in Q2A Core by
edited by

When we hide selected answer, selected class (qa-a-count-selected) is applied on question list.

Solution example in view layer:

qa-include/qa-theme-base.php (L1587) *Recommended*

//@$post['answer_selected'] ? 'qa-a-count-selected' : (@$post['answers_raw'] ? null : 'qa-a-count-zero'));
@$post['acount'] && @$post['answer_selected'] ? 'qa-a-count-selected' : (@$post['answers_raw'] ? null : 'qa-a-count-zero'));

Solution example in application layer:

qa-include/qa-app-format.php (L325)

//$fields['answer_selected']=isset($post['selchildid']);
if($post['acount']==0)
  $fields['answer_selected']=false;
else
  $fields['answer_selected']=isset($post['selchildid']);
Is that we must consider (question page) when $post['acount'] does not exist ...?
by
Fyi, I think there is a relation with this issue :
https://github.com/q2a/question2answer/issues/79
by
edited by
Thanks max.
Because there is reshow feature, I think Scott thought is right.
https://github.com/q2a/question2answer/issues/79
=== quotation [start] ===
I think the solution, at least for now, is to keep hidden answers selected but not make the box green when the selected answer is hidden. From the outside, it appears there is no selected answer. If User B hides then reshows their answer it's still selected, as A intended.
=== quotation [end] ===

Please log in or register to answer this question.

...