Fixes linting problems

This commit is contained in:
Vitor Pamplona
2024-07-03 11:21:22 -04:00
parent 6e1de6fd26
commit 8c34394d86
2 changed files with 7 additions and 8 deletions

View File

@@ -100,7 +100,11 @@ fun RelayInformationDialog(
), ),
) { ) {
Surface { Surface {
val color = mutableStateOf(Color.Transparent) val color =
remember {
mutableStateOf(Color.Transparent)
}
val context = LocalContext.current val context = LocalContext.current
LazyColumn( LazyColumn(

View File

@@ -59,7 +59,6 @@ import com.vitorpamplona.amethyst.ui.theme.Size17Modifier
import com.vitorpamplona.amethyst.ui.theme.StdVertSpacer import com.vitorpamplona.amethyst.ui.theme.StdVertSpacer
import com.vitorpamplona.amethyst.ui.theme.noteComposeRelayBox import com.vitorpamplona.amethyst.ui.theme.noteComposeRelayBox
import com.vitorpamplona.amethyst.ui.theme.placeholderText import com.vitorpamplona.amethyst.ui.theme.placeholderText
import kotlinx.coroutines.flow.map
@Composable @Composable
fun RelayBadges( fun RelayBadges(
@@ -125,13 +124,9 @@ fun WatchAndRenderRelay(
val noteRelays by baseNote val noteRelays by baseNote
.flow() .flow()
.relays.stateFlow .relays.stateFlow
.map { .collectAsStateWithLifecycle()
it.note.relays.getOrNull(relayIndex)
}.collectAsStateWithLifecycle(
baseNote.relays.getOrNull(relayIndex),
)
CrossfadeIfEnabled(targetState = noteRelays, label = "RenderRelay", modifier = Size17Modifier, accountViewModel = accountViewModel) { CrossfadeIfEnabled(targetState = noteRelays.note.relays.getOrNull(relayIndex), label = "RenderRelay", modifier = Size17Modifier, accountViewModel = accountViewModel) {
if (it != null) { if (it != null) {
RenderRelay(it, accountViewModel, nav) RenderRelay(it, accountViewModel, nav)
} }