Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add BlurNsfwExceptFromNsfwCommunities to blur types #1229
Add BlurNsfwExceptFromNsfwCommunities to blur types #1229
Changes from all commits
0101e34
6ff1a1c
3dbe8e3
a4470e7
1ea34d7
316e331
f9f0ac4
61759d4
ff6cef1
128aa70
9bceb34
0119777
f31569a
128d263
4bca117
c69b050
a50b8d2
a109d6b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Remove this type, as discussed we keep only, blur nothing, blur nsfw and blur nsfw but not in community view
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.
@MV-GH I didn't understand you, only these 3 options remain. 4 option (ExceptFromNsfwInsideCommunity) it technical option. In community activity I swap NsfwExceptFromNsfwCommunities option for it.
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.
That's not how I meant that second approach. The second approach was, turn NSFWExceptInsideCommunity into Nothing if passed to communityActiviity else convert it to NSFW and then you only have to handle those two cases
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.
I can't figure out how and where to do this. In Main Activity for every Activity?
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.
yes but you can do it once under appsetting and pass that. except for community activity where you then pass the other option. But first I have to know if Dessalines would accept such approach.
@dessalines Would you be against the above approach or do you rather that we have a extra param indicating that this is community view. Or do you have a better approach in mind?
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.
Yes that seems fine. No point in adding an extra enum when it can figure that out by context, in the CommunityActivity.
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.
@MV-GH Am I understanding correctly that "NsfwExceptFromNsfwCommunities" works as "Nothing" only for nsfw communities, otherwise it works as "NSFW"? If this is true then I can't change it in MainActivity because I need the community type.
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.
For what do you need the communityType? You map it there either to Nothing or NSFW ordinals depending if its for CommunityView
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.
@MV-GH what behavior should there be with the nsfw posts if Community.nsfw = false and blur option = "NsfwExceptFromNsfwCommunities"? Doesn't it then transform into, a "NSFW" not in "Nothing"?
I mean not communityType but Community.nsfw parameter
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.
Remove the community nsfw option, we don't care anymore if the post comes from a nsfw community or not. And if the function receives NsfwExceptFromNsfwCommunity then throw with message likr this type should ve already been transformed into another
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.
compare on ordinal
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.
and blurType
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.
Why can't these use the BlurType enum?
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.
We don't do it either for other enums, see postActionMode below it
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.
mmk, I'll test this shortly.