-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
JohnOberhauser
commented
Nov 15, 2023
- Updating content warning UI in new post screen
- Adding content warnings to post cards
@@ -131,6 +131,9 @@ object MoSoIcons { | |||
@Composable | |||
fun lock() = painterResource(id = R.drawable.lock) | |||
|
|||
@Composable |
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.
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()) |
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 think you want to use derivedStateOf
instead of mutableStateOf
mutableStateOf(contentWarningText.isNotBlank()) | ||
} | ||
var isShowing by remember(hasContentWarning) { | ||
mutableStateOf(!hasContentWarning) |
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.
Same here
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.
This one has to be mutable since I'm changing the value when the user clicks the content warning
…into contentWarnings