Changing name to mark_as_read

This commit is contained in:
Dessalines 2024-11-13 08:48:48 -05:00
parent e0da787890
commit 912aafb5e4
2 changed files with 2 additions and 2 deletions

View file

@ -110,7 +110,7 @@ pub struct GetPosts {
pub show_nsfw: Option<bool>,
/// Whether to automatically mark fetched posts as read.
#[cfg_attr(feature = "full", ts(optional))]
pub auto_mark_fetched_posts_as_read: Option<bool>,
pub mark_as_read: Option<bool>,
#[cfg_attr(feature = "full", ts(optional))]
/// If true, then only show posts with no comments
pub no_comments_only: Option<bool>,

View file

@ -96,7 +96,7 @@ pub async fn list_posts(
// If in their user settings (or as part of the API request), auto-mark fetched posts as read
if let Some(local_user) = local_user {
if data
.auto_mark_fetched_posts_as_read
.mark_as_read
.unwrap_or(local_user.auto_mark_fetched_posts_as_read)
{
let post_ids = posts.iter().map(|p| p.post.id).collect::<Vec<PostId>>();