diff --git a/app/src/main/kotlin/com/wire/android/ui/debug/DebugDataOptions.kt b/app/src/main/kotlin/com/wire/android/ui/debug/DebugDataOptions.kt index 7cc855f5187..08ad4b2c581 100644 --- a/app/src/main/kotlin/com/wire/android/ui/debug/DebugDataOptions.kt +++ b/app/src/main/kotlin/com/wire/android/ui/debug/DebugDataOptions.kt @@ -431,20 +431,23 @@ private fun DebugToolsOptions( */ @Composable fun DependenciesItem(dependencies: ImmutableMap) { - val title = stringResource(id = R.string.item_dependencies_title) - val text = remember { - prettyPrintMap(dependencies, title) + val text = remember(dependencies) { + dependencies.prettyPrintMap() } RowItemTemplate( - modifier = Modifier.wrapContentWidth(), + modifier = Modifier.padding(dimensions().spacing8x), title = { + Text( + style = MaterialTheme.wireTypography.label01, + color = MaterialTheme.wireColorScheme.secondaryText, + text = stringResource(id = R.string.item_dependencies_title), + ) Text( style = MaterialTheme.wireTypography.body01, color = MaterialTheme.wireColorScheme.onBackground, text = text, - modifier = Modifier.padding(start = dimensions().spacing8x) ) - } + }, ) } @@ -478,12 +481,9 @@ private fun DisableEventProcessingSwitch( } @Stable -private fun prettyPrintMap(map: Map, title: String): String = StringBuilder().apply { - append("$title\n") - map.forEach { (key, value) -> - append("$key: $value\n") - } -}.toString() +private fun Map.prettyPrintMap(): String = this + .map { (key, value) -> "$key: $value" } + .joinToString("\n") //endregion @@ -512,6 +512,6 @@ fun PreviewOtherDebugOptions() { handleE2EIEnrollmentResult = {}, dismissCertificateDialog = {}, checkCrlRevocationList = {}, - dependenciesMap = persistentMapOf() + dependenciesMap = persistentMapOf("preview dependency" to "1.0.0", "another dependency" to "1.0.0") ) } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9a3a1365571..857b6435b46 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -214,7 +214,7 @@ API VERSIONING E2EI Manual Enrollment Force API versioning update - Dependencies: + Dependencies Update Support Back up & Restore Conversations