1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Fix Android titles

This commit is contained in:
Zhiyuan Zheng
2021-12-18 23:44:08 +01:00
parent 9b4f23e61f
commit 200a3e4741
10 changed files with 44 additions and 67 deletions

View File

@ -1,16 +1,15 @@
import { HeaderCenter, HeaderLeft } from '@components/Header'
import { HeaderLeft } from '@components/Header'
import { createNativeStackNavigator } from '@react-navigation/native-stack'
import { ScreenComposeStackScreenProps } from '@utils/navigation/navigators'
import React, { useCallback } from 'react'
import { useTranslation } from 'react-i18next'
import { Platform } from 'react-native'
import ComposeDraftsListRoot from './DraftsList/Root'
const Stack = createNativeStackNavigator()
const ComposeDraftsList: React.FC<ScreenComposeStackScreenProps<
'Screen-Compose-DraftsList'
>> = ({
const ComposeDraftsList: React.FC<
ScreenComposeStackScreenProps<'Screen-Compose-DraftsList'>
> = ({
route: {
params: { timestamp }
},
@ -40,12 +39,7 @@ const ComposeDraftsList: React.FC<ScreenComposeStackScreenProps<
children={children}
options={{
headerLeft,
headerTitle: t('content.draftsList.header.title'),
...(Platform.OS === 'android' && {
headerCenter: () => (
<HeaderCenter content={t('content.draftsList.header.title')} />
)
}),
title: t('content.draftsList.header.title'),
headerShadowVisible: false
}}
/>

View File

@ -49,7 +49,7 @@ const ComposeEditAttachment: React.FC<ScreenComposeStackScreenProps<
options={{
headerLeft,
headerRight: () => <ComposeEditAttachmentSubmit index={index} />,
headerTitle: t('content.editAttachment.header.title')
title: t('content.editAttachment.header.title')
}}
/>
</Stack.Navigator>