Bluesky app fork with some witchin' additions 💫

add header to empty chat list view (#3791)

authored by samuel.fm and committed by

GitHub 8304ad91 538ca8df

+22 -4
+1 -1
src/components/Error.tsx
··· 72 72 a.text_center, 73 73 t.atoms.text_contrast_high, 74 74 {lineHeight: 1.4}, 75 - gtMobile && {width: 450}, 75 + gtMobile ? {width: 450} : [a.w_full, a.px_lg], 76 76 ]}> 77 77 {message} 78 78 </Text>
+21 -3
src/screens/Messages/List/index.tsx
··· 18 18 import {TimeElapsed} from '#/view/com/util/TimeElapsed' 19 19 import {PreviewableUserAvatar} from '#/view/com/util/UserAvatar' 20 20 import {ViewHeader} from '#/view/com/util/ViewHeader' 21 + import {CenteredView} from '#/view/com/util/Views' 21 22 import {atoms as a, useBreakpoints, useTheme} from '#/alf' 22 23 import {Button, ButtonIcon, ButtonText} from '#/components/Button' 23 24 import {DialogControlProps, useDialogControl} from '#/components/Dialog' ··· 110 111 111 112 if (conversations.length < 1) { 112 113 return ( 113 - <> 114 + <View style={a.flex_1}> 115 + {gtMobile ? ( 116 + <CenteredView sideBorders> 117 + <DesktopHeader 118 + newChatControl={newChatControl} 119 + onNavigateToSettings={onNavigateToSettings} 120 + /> 121 + </CenteredView> 122 + ) : ( 123 + <ViewHeader 124 + title={_(msg`Messages`)} 125 + renderButton={renderButton} 126 + showBorder 127 + canGoBack={false} 128 + /> 129 + )} 130 + {!isError && <NewChat onNewChat={onNewChat} control={newChatControl} />} 114 131 <ListMaybePlaceholder 115 132 isLoading={isLoading} 116 133 isError={isError} 117 134 emptyType="results" 135 + emptyTitle={_(msg`No messages yet`)} 118 136 emptyMessage={_( 119 137 msg`You have no messages yet. Start a conversation with someone!`, 120 138 )} 121 139 errorMessage={cleanError(error)} 122 140 onRetry={isError ? refetch : undefined} 141 + hideBackButton 123 142 /> 124 - {!isError && <NewChat onNewChat={onNewChat} control={newChatControl} />} 125 - </> 143 + </View> 126 144 ) 127 145 } 128 146