Added help text to Android contact switch
This commit is contained in:
@@ -339,6 +339,7 @@ private fun ContactContent(
|
|||||||
)
|
)
|
||||||
if (screenState.new && BaresipService.contactsMode == "both")
|
if (screenState.new && BaresipService.contactsMode == "both")
|
||||||
Android(
|
Android(
|
||||||
|
ctx = ctx,
|
||||||
android = screenState.android,
|
android = screenState.android,
|
||||||
onAndroidChange = { newAndroid -> onStateChange(screenState.copy(android = newAndroid)) }
|
onAndroidChange = { newAndroid -> onStateChange(screenState.copy(android = newAndroid)) }
|
||||||
)
|
)
|
||||||
@@ -488,7 +489,6 @@ private fun Favorite(ctx: Context, favorite: Boolean, onFavoriteChange: (Boolean
|
|||||||
alertMessage.value = ctx.getString(R.string.favorite_help)
|
alertMessage.value = ctx.getString(R.string.favorite_help)
|
||||||
showAlert.value = true
|
showAlert.value = true
|
||||||
},
|
},
|
||||||
color = MaterialTheme.colorScheme.onBackground,
|
|
||||||
)
|
)
|
||||||
Switch(
|
Switch(
|
||||||
checked = favorite,
|
checked = favorite,
|
||||||
@@ -498,7 +498,7 @@ private fun Favorite(ctx: Context, favorite: Boolean, onFavoriteChange: (Boolean
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
private fun Android(android: Boolean, onAndroidChange: (Boolean) -> Unit) {
|
private fun Android(ctx: Context, android: Boolean, onAndroidChange: (Boolean) -> Unit) {
|
||||||
Row(
|
Row(
|
||||||
Modifier.fillMaxWidth(),
|
Modifier.fillMaxWidth(),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
@@ -506,8 +506,12 @@ private fun Android(android: Boolean, onAndroidChange: (Boolean) -> Unit) {
|
|||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.android),
|
text = stringResource(R.string.android),
|
||||||
modifier = Modifier.weight(1f),
|
modifier = Modifier.weight(1f)
|
||||||
//color = MaterialTheme.colorScheme.onBackground
|
.clickable {
|
||||||
|
alertTitle.value = ctx.getString(R.string.android)
|
||||||
|
alertMessage.value = ctx.getString(R.string.android_contact_help)
|
||||||
|
showAlert.value = true
|
||||||
|
},
|
||||||
)
|
)
|
||||||
Switch(
|
Switch(
|
||||||
checked = android,
|
checked = android,
|
||||||
|
|||||||
Reference in New Issue
Block a user