add: option to hide posts answering questions from "All" timeline

This commit is contained in:
trisua 2025-06-22 00:45:05 -04:00
parent 5961999ce4
commit 612fbf5eb4
6 changed files with 36 additions and 5 deletions

View file

@ -1364,6 +1364,11 @@
\"{{ profile.settings.auto_unlist }}\",
\"checkbox\",
],
[
[\"all_timeline_hide_answers\", 'Hide posts answering questions from the \"All\" timeline'],
\"{{ profile.settings.all_timeline_hide_answers }}\",
\"checkbox\",
],
[[], \"Questions\", \"title\"],
[
[

View file

@ -792,7 +792,10 @@ pub async fn all_request(
None => return Json(Error::NotAllowed.into()),
};
match data.get_latest_posts(12, props.page).await {
match data
.get_latest_posts(12, props.page, &Some(user.clone()))
.await
{
Ok(posts) => {
let ignore_users = crate::ignore_users_gen!(user!, #data);
Json(ApiReturn {

View file

@ -636,7 +636,9 @@ pub async fn swiss_army_timeline_request(
} else {
// everything else
match req.tl {
DefaultTimelineChoice::AllPosts => data.0.get_latest_posts(12, req.page).await,
DefaultTimelineChoice::AllPosts => {
data.0.get_latest_posts(12, req.page, &user).await
}
DefaultTimelineChoice::PopularPosts => {
data.0.get_popular_posts(12, req.page, 604_800_000).await
}