diff --git a/src/components/dialogs/nuxs/InviteFriendsAnnouncement.tsx b/src/components/dialogs/nuxs/InviteFriendsAnnouncement.tsx index 5bc04c86ba..70f4057d50 100644 --- a/src/components/dialogs/nuxs/InviteFriendsAnnouncement.tsx +++ b/src/components/dialogs/nuxs/InviteFriendsAnnouncement.tsx @@ -3,7 +3,9 @@ import {View} from 'react-native' import {Image} from 'expo-image' import {Trans, useLingui} from '@lingui/react/macro' +import {useCallOnce} from '#/lib/once' import {atoms as a, useTheme, web} from '#/alf' +import {themes} from '#/alf/themes' import {Button, ButtonText} from '#/components/Button' import * as Dialog from '#/components/Dialog' import {useNuxDialogContext} from '#/components/dialogs/nuxs' @@ -28,11 +30,12 @@ export function InviteFriendsAnnouncement() { Dialog.useAutoOpen(control) - useEffect(() => { + const firePresented = useCallOnce(() => { ax.metric('invite:nux:presented', {}) - // Fire once on mount - the NUX has a single lifecycle per session. - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []) + }) + useEffect(() => { + firePresented() + }, [firePresented]) const onClose = useCallback(() => { nuxDialogs.dismissActiveNux() @@ -87,10 +90,16 @@ export function InviteFriendsAnnouncement() { a.align_center, {top: 0, left: 0, right: 0, paddingTop: IS_WEB ? 24 : 20}, ]}> + {/* Pinned to the light palette: the header illustration has a + fixed light background, so the tag must stay dark in any + theme to remain legible. */} - + + style={[ + a.font_semi_bold, + {color: themes.lightPalette.primary_800}, + ]}> New Feature diff --git a/src/view/com/profile/ProfileFollowers.tsx b/src/view/com/profile/ProfileFollowers.tsx index 8fb7fef2bf..32ec6d6deb 100644 --- a/src/view/com/profile/ProfileFollowers.tsx +++ b/src/view/com/profile/ProfileFollowers.tsx @@ -184,15 +184,15 @@ export function ProfileFollowers({name}: {name: string}) { !isFollowersLoading && !isError - if (followers.length < 1) { - return ( - <> - {showFollowersPromo && ( - navigation.navigate('FindContactsSettings')} - onDismiss={() => setFollowersPromoDismissed(true)} - /> - )} + return ( + <> + {showFollowersPromo && ( + navigation.navigate('FindContactsSettings')} + onDismiss={() => setFollowersPromoDismissed(true)} + /> + )} + {followers.length < 1 ? ( navigation.goBack(), }} /> - - ) - } - - return ( - + } + // @ts-ignore our .web version only -prf + desktopFixedHeight + initialNumToRender={initialNumToRender} + windowSize={11} + sideBorders={false} /> - } - // @ts-ignore our .web version only -prf - desktopFixedHeight - initialNumToRender={initialNumToRender} - windowSize={11} - sideBorders={false} - /> + )} + ) } diff --git a/src/view/shell/Drawer.tsx b/src/view/shell/Drawer.tsx index 2806155a79..2e151fa832 100644 --- a/src/view/shell/Drawer.tsx +++ b/src/view/shell/Drawer.tsx @@ -331,6 +331,7 @@ let DrawerContent = ({}: React.PropsWithoutRef<{}>): React.ReactNode => { IS_NATIVE ? () => { ax.metric('invite:dialog:open', {logContext: 'Drawer'}) + setDrawerOpen(false) inviteFriendsControl.open() } : undefined