mirror of
https://github.com/LemmyNet/lemmy
synced 2024-11-21 20:13:05 +00:00
Fix override logic.
This commit is contained in:
parent
9e7ab40250
commit
923d7f0eca
1 changed files with 3 additions and 3 deletions
|
@ -95,9 +95,9 @@ pub async fn list_posts(
|
||||||
|
|
||||||
// If in their user settings (or as part of the API request), auto-mark fetched posts as read
|
// 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 let Some(local_user) = local_user {
|
||||||
if data
|
// If false is passed, then don't mark as read
|
||||||
.auto_mark_fetched_posts_as_read
|
if data.auto_mark_fetched_posts_as_read.unwrap_or(true)
|
||||||
.unwrap_or(local_user.auto_mark_fetched_posts_as_read)
|
&& local_user.auto_mark_fetched_posts_as_read
|
||||||
{
|
{
|
||||||
let post_ids = posts.iter().map(|p| p.post.id).collect::<Vec<PostId>>();
|
let post_ids = posts.iter().map(|p| p.post.id).collect::<Vec<PostId>>();
|
||||||
PostRead::mark_as_read(&mut context.pool(), &post_ids, local_user.person_id).await?;
|
PostRead::mark_as_read(&mut context.pool(), &post_ids, local_user.person_id).await?;
|
||||||
|
|
Loading…
Reference in a new issue