From 36326c0bd1471f619154eaaaeb9e9a2989b55b5b Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Fri, 16 Feb 2024 16:22:14 -0600 Subject: [PATCH] Some PNP fixes Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> --- _locales/en/messages.json | 2 +- ts/components/LeftPane.tsx | 24 +++++++++++++----------- ts/components/ProfileEditor.tsx | 4 +++- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index c3378ab7b6..5a4048cfec 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -2439,7 +2439,7 @@ "description": "Error message when you try to send an edit after message becomes too old" }, "icu:startConversation--username-not-found": { - "messageformat": "User not found. {atUsername} is not a Signal user; make sure you’ve entered the complete username.", + "messageformat": "{atUsername} is not a Signal user. Make sure you've entered the complete username.", "description": "Shown in dialog if username is not found. Note that 'username' will be the output of at-username" }, "icu:startConversation--phone-number-not-found": { diff --git a/ts/components/LeftPane.tsx b/ts/components/LeftPane.tsx index 47768b98d3..af86e1fb70 100644 --- a/ts/components/LeftPane.tsx +++ b/ts/components/LeftPane.tsx @@ -625,17 +625,18 @@ export function LeftPane({ dialogs.push({ key: 'banner', dialog: maybeBanner }); } + const hideHeader = + modeSpecificProps.mode === LeftPaneMode.Archive || + modeSpecificProps.mode === LeftPaneMode.Compose || + modeSpecificProps.mode === LeftPaneMode.FindByUsername || + modeSpecificProps.mode === LeftPaneMode.FindByPhoneNumber || + modeSpecificProps.mode === LeftPaneMode.ChooseGroupMembers || + modeSpecificProps.mode === LeftPaneMode.SetGroupMetadata; + return ( )}
- {dialogs.map(({ key, dialog }) => ( - {dialog} - ))} + {!hideHeader && + dialogs.map(({ key, dialog }) => ( + {dialog} + ))}
{preRowsNode && {preRowsNode}}
diff --git a/ts/components/ProfileEditor.tsx b/ts/components/ProfileEditor.tsx index e01c358eb4..ccd1a07087 100644 --- a/ts/components/ProfileEditor.tsx +++ b/ts/components/ProfileEditor.tsx @@ -621,6 +621,8 @@ export function ProfileEditor({ } label={i18n('icu:ProfileEditor__username-link')} onClick={() => { + markCompletedUsernameLinkOnboarding(); + if (usernameLinkCorrupted) { setIsResettingUsernameLink(true); return; @@ -633,7 +635,7 @@ export function ProfileEditor({ /> ); - if (!hasCompletedUsernameLinkOnboarding) { + if (!hasCompletedUsernameLinkOnboarding && !usernameLink) { maybeUsernameLinkRow = (