Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Content warnings #282

Merged
merged 4 commits into from
Nov 16, 2023
Merged

Content warnings #282

merged 4 commits into from
Nov 16, 2023

Conversation

JohnOberhauser
Copy link
Member

  • Updating content warning UI in new post screen
  • Adding content warnings to post cards

@JohnOberhauser JohnOberhauser requested review from a team, devotaaabel and timc-mozilla and removed request for a team November 15, 2023 21:34
@@ -131,6 +131,9 @@ object MoSoIcons {
@Composable
fun lock() = painterResource(id = R.drawable.lock)

@Composable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a huge deal but I've been trying to keep these alphabetized (Though it wouldn't be hard to convince me that it's not necessary)

) {
Column {
val hasContentWarning by remember(contentWarningText) {
mutableStateOf(contentWarningText.isNotBlank())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you want to use derivedStateOf instead of mutableStateOf

mutableStateOf(contentWarningText.isNotBlank())
}
var isShowing by remember(hasContentWarning) {
mutableStateOf(!hasContentWarning)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one has to be mutable since I'm changing the value when the user clicks the content warning

@JohnOberhauser JohnOberhauser enabled auto-merge (squash) November 16, 2023 01:07
@JohnOberhauser JohnOberhauser merged commit 07f1ea2 into main Nov 16, 2023
3 checks passed
@JohnOberhauser JohnOberhauser deleted the contentWarnings branch November 16, 2023 01:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants