Fixes wrapping a non-observable value
This commit is contained in:
@@ -37,7 +37,6 @@ import androidx.compose.runtime.Composable
|
|||||||
import androidx.compose.runtime.LaunchedEffect
|
import androidx.compose.runtime.LaunchedEffect
|
||||||
import androidx.compose.runtime.MutableState
|
import androidx.compose.runtime.MutableState
|
||||||
import androidx.compose.runtime.State
|
import androidx.compose.runtime.State
|
||||||
import androidx.compose.runtime.derivedStateOf
|
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
@@ -1381,9 +1380,10 @@ fun FirstUserInfoRow(
|
|||||||
|
|
||||||
if (isDraft) {
|
if (isDraft) {
|
||||||
ObserveDraftEvent(baseNote, accountViewModel) { draftNote ->
|
ObserveDraftEvent(baseNote, accountViewModel) { draftNote ->
|
||||||
val isCommunityPost by remember(draftNote) {
|
val isCommunityPost =
|
||||||
derivedStateOf { draftNote.event?.isACommunityPost() == true }
|
remember(draftNote) {
|
||||||
}
|
draftNote.event?.isACommunityPost() == true
|
||||||
|
}
|
||||||
|
|
||||||
if (isCommunityPost) {
|
if (isCommunityPost) {
|
||||||
DisplayFollowingCommunityInPost(draftNote, accountViewModel, nav)
|
DisplayFollowingCommunityInPost(draftNote, accountViewModel, nav)
|
||||||
@@ -1392,9 +1392,10 @@ fun FirstUserInfoRow(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
val isCommunityPost by remember(baseNote) {
|
val isCommunityPost =
|
||||||
derivedStateOf { baseNote.event?.isACommunityPost() == true }
|
remember(baseNote) {
|
||||||
}
|
baseNote.event?.isACommunityPost() == true
|
||||||
|
}
|
||||||
|
|
||||||
if (isCommunityPost) {
|
if (isCommunityPost) {
|
||||||
DisplayFollowingCommunityInPost(baseNote, accountViewModel, nav)
|
DisplayFollowingCommunityInPost(baseNote, accountViewModel, nav)
|
||||||
|
|||||||
Reference in New Issue
Block a user