mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-02 14:43:09 +01:00
Do not show nickname field for Note to Self.
This commit is contained in:
@@ -503,7 +503,7 @@ class ConversationSettingsFragment : DSLSettingsFragment(
|
||||
)
|
||||
}
|
||||
|
||||
if (FeatureFlags.nicknames() && state.recipient.isIndividual) {
|
||||
if (FeatureFlags.nicknames() && state.recipient.isIndividual && !state.recipient.isSelf) {
|
||||
clickPref(
|
||||
title = DSLSettingsText.from(R.string.NicknameActivity__nickname),
|
||||
icon = DSLSettingsIcon.from(R.drawable.symbol_edit_24),
|
||||
|
||||
@@ -193,7 +193,7 @@ private fun Content(
|
||||
|
||||
AboutRow(
|
||||
startIcon = painterResource(R.drawable.symbol_person_24),
|
||||
text = if (model.hasUserSetDisplayName && model.displayName.isNotBlank() && model.profileName.isNotBlank()) {
|
||||
text = if (!model.isSelf && model.hasUserSetDisplayName && model.displayName.isNotBlank() && model.profileName.isNotBlank()) {
|
||||
stringResource(id = R.string.AboutSheet__user_set_display_name_and_profile_name, model.displayName, model.profileName)
|
||||
} else {
|
||||
model.displayName
|
||||
@@ -428,6 +428,38 @@ private fun ContentPreviewWithUserSetDisplayName() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Preview(name = "Light Theme", group = "content", uiMode = Configuration.UI_MODE_NIGHT_NO)
|
||||
@Preview(name = "Dark Theme", group = "content", uiMode = Configuration.UI_MODE_NIGHT_YES)
|
||||
@Composable
|
||||
private fun ContentPreviewForSelf() {
|
||||
SignalTheme {
|
||||
Surface {
|
||||
Content(
|
||||
model = AboutModel(
|
||||
isSelf = true,
|
||||
hasAvatar = true,
|
||||
displayName = "Amazing Spider-man",
|
||||
shortName = "Spiderman",
|
||||
profileName = "Peter Parker",
|
||||
hasUserSetDisplayName = true,
|
||||
about = "Photographer for the Daily Bugle.",
|
||||
verified = true,
|
||||
recipientForAvatar = Recipient.UNKNOWN,
|
||||
formattedE164 = "(123) 456-7890",
|
||||
profileSharing = true,
|
||||
systemContact = true,
|
||||
groupsInCommon = 0,
|
||||
note = "Weird Things Happen To Me All The Time."
|
||||
),
|
||||
onClickSignalConnections = {},
|
||||
onAvatarClicked = {},
|
||||
onNoteClicked = {}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview(name = "Light Theme", group = "content", uiMode = Configuration.UI_MODE_NIGHT_NO)
|
||||
@Preview(name = "Dark Theme", group = "content", uiMode = Configuration.UI_MODE_NIGHT_YES)
|
||||
@Composable
|
||||
|
||||
Reference in New Issue
Block a user