fix: show community in global question timelines
This commit is contained in:
parent
063e33899e
commit
bc95f0aaf0
3 changed files with 3 additions and 4 deletions
|
@ -20,7 +20,7 @@
|
||||||
<div class="card tertiary flex flex-col gap-4">
|
<div class="card tertiary flex flex-col gap-4">
|
||||||
<!-- prettier-ignore -->
|
<!-- prettier-ignore -->
|
||||||
{% for question in feed %}
|
{% for question in feed %}
|
||||||
{{ components::global_question(question=question, can_manage_questions=can_manage_questions) }}
|
{{ components::global_question(question=question, can_manage_questions=can_manage_questions, show_community=false) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{{ components::pagination(page=page, items=feed|length) }}
|
{{ components::pagination(page=page, items=feed|length) }}
|
||||||
|
|
|
@ -699,10 +699,10 @@ is_global=false) -%}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{%- endmacro %} {% macro global_question(question, can_manage_questions=false,
|
{%- endmacro %} {% macro global_question(question, can_manage_questions=false,
|
||||||
secondary=false) -%}
|
secondary=false, show_community=true) -%}
|
||||||
<div class="card-nest">
|
<div class="card-nest">
|
||||||
{{ components::question(question=question[0], owner=question[1],
|
{{ components::question(question=question[0], owner=question[1],
|
||||||
show_community=false) }}
|
show_community=show_community) }}
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="card flex flex-wrap gap-2{% if secondary %} secondary{% endif %}"
|
class="card flex flex-wrap gap-2{% if secondary %} secondary{% endif %}"
|
||||||
|
|
|
@ -104,7 +104,6 @@ impl DataManager {
|
||||||
/// Get the question of a given post.
|
/// Get the question of a given post.
|
||||||
pub async fn get_post_question(&self, post: &Post) -> Result<Option<(Question, User)>> {
|
pub async fn get_post_question(&self, post: &Post) -> Result<Option<(Question, User)>> {
|
||||||
if post.context.answering != 0 {
|
if post.context.answering != 0 {
|
||||||
dbg!(&post.context.answering);
|
|
||||||
let question = self.get_question_by_id(post.context.answering).await?;
|
let question = self.get_question_by_id(post.context.answering).await?;
|
||||||
let user = self.get_user_by_id_with_void(question.owner).await?;
|
let user = self.get_user_by_id_with_void(question.owner).await?;
|
||||||
Ok(Some((question, user)))
|
Ok(Some((question, user)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue