Skip to content

Commit

Permalink
[#579] Adapt code after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
paulinea committed Sep 12, 2023
1 parent 6c98e95 commit d739feb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.google.accompanist.flowlayout.FlowRow
import com.orange.ods.app.R
import com.orange.ods.app.ui.LocalThemeManager
import com.orange.ods.app.ui.modules.ModuleDemoDestinations
import com.orange.ods.compose.component.button.OdsButton
import com.orange.ods.compose.component.button.OdsButtonStyle
import com.orange.ods.compose.component.chip.OdsFilterChip
import com.orange.ods.compose.text.OdsTextBody2
import com.orange.ods.module.about.AboutModuleConfiguration
import com.orange.ods.theme.OdsComponentsConfiguration

enum class AboutOptions(@StringRes val labelResId: Int) {
Version(R.string.module_about_customization_version),
Expand All @@ -42,8 +40,6 @@ enum class AboutOptions(@StringRes val labelResId: Int) {

@Composable
fun AboutCustomization(navigateToModuleDemo: (String) -> Unit) {
val outlinedChips =
LocalThemeManager.current.currentThemeConfiguration.componentsConfiguration.chipStyle == OdsComponentsConfiguration.ComponentStyle.Outlined
var selectedOptions by rememberSaveable { mutableStateOf(emptyList<AboutOptions>()) }

OdsTextBody2(
Expand All @@ -64,7 +60,6 @@ fun AboutCustomization(navigateToModuleDemo: (String) -> Unit) {
onClick = {
selectedOptions = with(selectedOptions) { if (contains(option)) minus(option) else plus(option) }
},
outlined = outlinedChips,
selected = selectedOptions.contains(option),
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.orange.ods.compose.component.button.OdsButtonIcon
import com.orange.ods.compose.component.button.OdsTextButton
import com.orange.ods.compose.component.button.OdsTextButtonStyle
import com.orange.ods.compose.text.OdsTextBody1
Expand Down Expand Up @@ -60,15 +61,17 @@ internal fun AboutMainScreen() {
OdsTextButton(
modifier = Modifier.padding(end = dimensionResource(id = com.orange.ods.R.dimen.spacing_s)),
text = stringResource(id = R.string.app_share),
icon = painterResource(id = R.drawable.ic_share),
icon = OdsButtonIcon(painterResource(id = R.drawable.ic_share)),
onClick = { /*TODO*/ },
style = OdsTextButtonStyle.Primary
)
}
if (configuration.feedback) {
OdsTextButton(
text = stringResource(id = R.string.app_feedback), icon = painterResource(id = R.drawable.ic_comment),
onClick = { /*TODO*/ }, style = OdsTextButtonStyle.Primary
text = stringResource(id = R.string.app_feedback),
icon = OdsButtonIcon(painterResource(id = R.drawable.ic_comment)),
onClick = { /*TODO*/ },
style = OdsTextButtonStyle.Primary
)
}
}
Expand Down

0 comments on commit d739feb

Please sign in to comment.