-
-
Notifications
You must be signed in to change notification settings - Fork 888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding a show_read override to GetPosts. #4846
Conversation
dessalines
commented
Jun 18, 2024
- If show_read is true, it overrides the local user show_read setting.
- Fixes Ignore user filters per request #4124
- If show_read is true, it overrides the local user show_read setting. - Fixes #4124
|
I've updated to make all of the post and comment query params as options. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing to Option<bool>
is not needed for fields other than show_read
because they have the same default value every time, unlike show_read
which overrides a LocalUser
field.
If the inconsistency of using both bool
and Option<bool>
is a problem, then you can either:
- Keep these changes (except for the change to
page_back
in my opinion) - Use
bool
instead ofOption<bool>
, remove theDefault
derive, and create this function that's does the same thing asDefault::default
except it setslocal_user: local_user, show_read: local_user.show_read_posts()
:fn new(local_user: Option<&'a LocalUser>) -> Self