Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ internal fun AppSettingsScreenContent() {
val context = LocalContext.current

LazyColumn {
items(appSettings) { option ->
items(appSettings, key = { it.setting.type.key }) { option ->
if (option.visible) {
SettingsSwitchRow(
modifier = Modifier.animateItem(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ internal fun TextureControls(
state.blendModes.map { it.blendMode }.forEachIndexed { index, mode ->
BlendModeTab(
mode = mode,
isSelected = index == selectedTabIndex
) { dispatchEvent(GraphicsEvent.CommitBlendMode(mode)) }
isSelected = index == selectedTabIndex,
onClick = { dispatchEvent(GraphicsEvent.CommitBlendMode(mode)) },
)
}
}

Expand Down Expand Up @@ -139,8 +140,8 @@ internal fun TextureControls(
internal fun BlendModeTab(
mode: BlendMode,
isSelected: Boolean,
modifier: Modifier = Modifier,
onClick: () -> Unit,
modifier: Modifier = Modifier,
) {
val backgroundColor by animateColorAsState(
if (isSelected) Color.White.copy(0.30f) else Color.Transparent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private fun PhoneCountrySelectionList(
onSelection: (CountryLocale) -> Unit
) {
LazyColumn(modifier) {
items(availableLocales) { countryCode ->
items(availableLocales, key = { it.countryCode }) { countryCode ->
Row(
modifier = Modifier
.fillMaxWidth()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.snapshotFlow
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.lifecycle.compose.collectAsStateWithLifecycle
Expand Down Expand Up @@ -49,10 +48,6 @@ internal fun RegionSelectionScreen(viewModel: RegionSelectionViewModel) {
modifier = Modifier.imePadding(),
verticalArrangement = Arrangement.spacedBy(CodeTheme.dimens.grid.x2),
) {
LaunchedEffect(Unit) {
snapshotFlow { state.searchState.text }
.launchIn(this)
}
SearchInput(
modifier = Modifier
.padding(horizontal = CodeTheme.dimens.grid.x3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import androidx.compose.ui.graphics.graphicsLayer

enum class CardFace(
val angle: Float,
var noAnim: Boolean = false
) {
Front(0f) {
override val next: CardFace
Expand Down Expand Up @@ -47,7 +46,7 @@ fun FlippableCard(
animateFloatAsState(
targetValue = cardFace.angle,
animationSpec = tween(
durationMillis = if (cardFace.noAnim) 0 else flipMs,
durationMillis = flipMs,
easing = FastOutSlowInEasing,
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ fun EmojiGarden(onClick: (String) -> Unit) {
color = CodeTheme.colors.textSecondary
)
}
items(frequentEmojis) { emoji ->
items(frequentEmojis, key = { "freq_${it.unicode}" }) { emoji ->
EmojiRender(
emoji = emoji.unicode,
showBackground = false,
Expand All @@ -171,7 +171,7 @@ fun EmojiGarden(onClick: (String) -> Unit) {
color = CodeTheme.colors.textSecondary
)
}
items(emojis.values.flatten()) { (emoji, _) ->
items(emojis.values.flatten(), key = { "${category.name}_${it.unicode}" }) { (emoji, _) ->
EmojiRender(
emoji = emoji,
showBackground = false,
Expand Down
Loading