Hide irrelevant rows in self about sheet.

This commit is contained in:
Nicholas Tinsley
2024-04-12 17:18:03 -04:00
committed by Greyson Parrelli
parent 8f1722c718
commit d36b2a23f5

View File

@@ -218,7 +218,7 @@ private fun Content(
)
}
if (model.verified) {
if (!model.isSelf && model.verified) {
AboutRow(
startIcon = painterResource(id = R.drawable.check),
text = stringResource(id = R.string.AboutSheet__verified),
@@ -227,6 +227,7 @@ private fun Content(
)
}
if (!model.isSelf) {
if (model.profileSharing || model.systemContact) {
AboutRow(
startIcon = painterResource(id = R.drawable.symbol_connections_24),
@@ -243,8 +244,9 @@ private fun Content(
onClick = onClickSignalConnections
)
}
}
if (model.systemContact) {
if (!model.isSelf && model.systemContact) {
AboutRow(
startIcon = painterResource(id = R.drawable.symbol_person_circle_24),
text = stringResource(id = R.string.AboutSheet__s_is_in_your_system_contacts, model.shortName),
@@ -260,6 +262,7 @@ private fun Content(
)
}
if (!model.isSelf) {
val groupsInCommonText = if (model.groupsInCommon > 0) {
pluralStringResource(id = R.plurals.AboutSheet__d_groups_in, model.groupsInCommon, model.groupsInCommon)
} else {
@@ -277,6 +280,7 @@ private fun Content(
text = groupsInCommonText,
modifier = Modifier.fillMaxWidth()
)
}
if (model.note.isNotBlank()) {
AboutRow(