fix(web): force replies display in thread view

This commit is contained in:
əlemi 2024-05-29 05:34:51 +02:00
parent b4bd7c845f
commit 1cc41cced3
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 3 additions and 2 deletions

View file

@ -36,6 +36,7 @@ pub fn ActivityLine(activity: crate::Object) -> impl IntoView {
pub fn Item(
item: crate::Object,
#[prop(optional)] sep: bool,
#[prop(optional)] replies: bool,
) -> impl IntoView {
let config = use_context::<Signal<crate::Config>>().expect("missing config context");
let id = item.id().unwrap_or_default().to_string();
@ -55,7 +56,7 @@ pub fn Item(
Some(apb::ObjectType::Activity(t)) => (move || {
if config.get().filters.visible(apb::ObjectType::Activity(t)) {
let object_id = item.object().id().unwrap_or_default();
if !config.get().filters.replies && CACHE.get(&object_id).map(|x| x.in_reply_to().id().is_some()).unwrap_or(false) {
if !replies && !config.get().filters.replies && CACHE.get(&object_id).map(|x| x.in_reply_to().id().is_some()).unwrap_or(false) {
None
} else {
let object = match t {

View file

@ -103,7 +103,7 @@ pub fn TimelineRepliesRecursive(tl: Timeline, root: String) -> impl IntoView {
let oid = obj.id().unwrap_or_default().to_string();
view! {
<div class="context depth-r">
<Item item=obj />
<Item item=obj replies=true />
<div class="depth-r">
<TimelineRepliesRecursive tl=tl root=oid />
</div>