mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 12:38:33 +00:00
Hide irrelevant rows in self about sheet.
This commit is contained in:
committed by
Greyson Parrelli
parent
8f1722c718
commit
d36b2a23f5
@@ -218,7 +218,7 @@ private fun Content(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (model.verified) {
|
if (!model.isSelf && model.verified) {
|
||||||
AboutRow(
|
AboutRow(
|
||||||
startIcon = painterResource(id = R.drawable.check),
|
startIcon = painterResource(id = R.drawable.check),
|
||||||
text = stringResource(id = R.string.AboutSheet__verified),
|
text = stringResource(id = R.string.AboutSheet__verified),
|
||||||
@@ -227,24 +227,26 @@ private fun Content(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (model.profileSharing || model.systemContact) {
|
if (!model.isSelf) {
|
||||||
AboutRow(
|
if (model.profileSharing || model.systemContact) {
|
||||||
startIcon = painterResource(id = R.drawable.symbol_connections_24),
|
AboutRow(
|
||||||
text = stringResource(id = R.string.AboutSheet__signal_connection),
|
startIcon = painterResource(id = R.drawable.symbol_connections_24),
|
||||||
endIcon = painterResource(id = R.drawable.symbol_chevron_right_compact_bold_16),
|
text = stringResource(id = R.string.AboutSheet__signal_connection),
|
||||||
modifier = Modifier.align(alignment = Alignment.Start),
|
endIcon = painterResource(id = R.drawable.symbol_chevron_right_compact_bold_16),
|
||||||
onClick = onClickSignalConnections
|
modifier = Modifier.align(alignment = Alignment.Start),
|
||||||
)
|
onClick = onClickSignalConnections
|
||||||
} else {
|
)
|
||||||
AboutRow(
|
} else {
|
||||||
startIcon = painterResource(id = R.drawable.chat_x),
|
AboutRow(
|
||||||
text = stringResource(id = R.string.AboutSheet__no_direct_message, model.shortName),
|
startIcon = painterResource(id = R.drawable.chat_x),
|
||||||
modifier = Modifier.align(alignment = Alignment.Start),
|
text = stringResource(id = R.string.AboutSheet__no_direct_message, model.shortName),
|
||||||
onClick = onClickSignalConnections
|
modifier = Modifier.align(alignment = Alignment.Start),
|
||||||
)
|
onClick = onClickSignalConnections
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (model.systemContact) {
|
if (!model.isSelf && model.systemContact) {
|
||||||
AboutRow(
|
AboutRow(
|
||||||
startIcon = painterResource(id = R.drawable.symbol_person_circle_24),
|
startIcon = painterResource(id = R.drawable.symbol_person_circle_24),
|
||||||
text = stringResource(id = R.string.AboutSheet__s_is_in_your_system_contacts, model.shortName),
|
text = stringResource(id = R.string.AboutSheet__s_is_in_your_system_contacts, model.shortName),
|
||||||
@@ -260,23 +262,25 @@ private fun Content(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
val groupsInCommonText = if (model.groupsInCommon > 0) {
|
if (!model.isSelf) {
|
||||||
pluralStringResource(id = R.plurals.AboutSheet__d_groups_in, model.groupsInCommon, model.groupsInCommon)
|
val groupsInCommonText = if (model.groupsInCommon > 0) {
|
||||||
} else {
|
pluralStringResource(id = R.plurals.AboutSheet__d_groups_in, model.groupsInCommon, model.groupsInCommon)
|
||||||
stringResource(id = R.string.AboutSheet__you_have_no_groups_in_common)
|
} else {
|
||||||
}
|
stringResource(id = R.string.AboutSheet__you_have_no_groups_in_common)
|
||||||
|
}
|
||||||
|
|
||||||
val groupsInCommonIcon = if (!model.profileSharing && model.groupsInCommon == 0) {
|
val groupsInCommonIcon = if (!model.profileSharing && model.groupsInCommon == 0) {
|
||||||
painterResource(R.drawable.symbol_error_circle_24)
|
painterResource(R.drawable.symbol_error_circle_24)
|
||||||
} else {
|
} else {
|
||||||
painterResource(R.drawable.symbol_group_24)
|
painterResource(R.drawable.symbol_group_24)
|
||||||
}
|
}
|
||||||
|
|
||||||
AboutRow(
|
AboutRow(
|
||||||
startIcon = groupsInCommonIcon,
|
startIcon = groupsInCommonIcon,
|
||||||
text = groupsInCommonText,
|
text = groupsInCommonText,
|
||||||
modifier = Modifier.fillMaxWidth()
|
modifier = Modifier.fillMaxWidth()
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
if (model.note.isNotBlank()) {
|
if (model.note.isNotBlank()) {
|
||||||
AboutRow(
|
AboutRow(
|
||||||
|
|||||||
Reference in New Issue
Block a user