From 8304ad91ac3862becca5b3f4f7fd90b8b39d1dea Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Wed, 1 May 2024 18:43:54 +0100 Subject: [PATCH] add header to empty chat list view (#3791) --- src/components/Error.tsx | 2 +- src/screens/Messages/List/index.tsx | 24 +++++++++++++++++++++--- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/components/Error.tsx b/src/components/Error.tsx index ee479cca..48153243 100644 --- a/src/components/Error.tsx +++ b/src/components/Error.tsx @@ -72,7 +72,7 @@ export function Error({ a.text_center, t.atoms.text_contrast_high, {lineHeight: 1.4}, - gtMobile && {width: 450}, + gtMobile ? {width: 450} : [a.w_full, a.px_lg], ]}> {message} diff --git a/src/screens/Messages/List/index.tsx b/src/screens/Messages/List/index.tsx index 65a2ff1e..8aa16efd 100644 --- a/src/screens/Messages/List/index.tsx +++ b/src/screens/Messages/List/index.tsx @@ -18,6 +18,7 @@ import {List} from '#/view/com/util/List' import {TimeElapsed} from '#/view/com/util/TimeElapsed' import {PreviewableUserAvatar} from '#/view/com/util/UserAvatar' import {ViewHeader} from '#/view/com/util/ViewHeader' +import {CenteredView} from '#/view/com/util/Views' import {atoms as a, useBreakpoints, useTheme} from '#/alf' import {Button, ButtonIcon, ButtonText} from '#/components/Button' import {DialogControlProps, useDialogControl} from '#/components/Dialog' @@ -110,19 +111,36 @@ export function MessagesListScreen({navigation}: Props) { if (conversations.length < 1) { return ( - <> + + {gtMobile ? ( + + + + ) : ( + + )} + {!isError && } - {!isError && } - + ) }