Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

show Home in center on iOS

ammarahm-ed6bfba5949edf
diff --git a/apps/mobile/src/components/header/HeaderTitle.js b/apps/mobile/src/components/header/HeaderTitle.js
index e55f5ee7d..ced7d7a0e 100644
--- a/apps/mobile/src/components/header/HeaderTitle.js
+++ b/apps/mobile/src/components/header/HeaderTitle.js
@@ -1,5 +1,5 @@
import React, {createRef, useEffect} from 'react';
-import {Text} from 'react-native';
+import {Text, Platform} from 'react-native';
import {SIZE, WEIGHT} from '../../common/common';
import {useTracked} from '../../provider';
@@ -14,6 +14,7 @@ export const HeaderTitle = ({root}) => {
fontSize: SIZE.xl,
color: headerTextState.color ? headerTextState.color : colors.pri,
fontFamily: WEIGHT.bold,
+ alignSelf:'center',
}}>
<Text
diff --git a/apps/mobile/src/components/header/index.js b/apps/mobile/src/components/header/index.js
index f8a3a7e9c..baee906c0 100644
--- a/apps/mobile/src/components/header/index.js
+++ b/apps/mobile/src/components/header/index.js
@@ -108,7 +108,7 @@ export const Header = ({showSearch, root}) => {
? 0
: insets.top,
marginBottom: 10,
- justifyContent: 'space-between',
+ justifyContent: 'center',
alignItems: 'center',
paddingHorizontal: 12,
width: '100%',
@@ -147,6 +147,8 @@ export const Header = ({showSearch, root}) => {
flexDirection: 'row',
justifyContent: 'flex-start',
alignItems: 'center',
+ position: 'absolute',
+ left: 12,
}}>
{headerState.canGoBack ? (
<TouchableOpacity
@@ -202,13 +204,16 @@ export const Header = ({showSearch, root}) => {
</TouchableOpacity>
) : undefined}
- <HeaderTitle root={root} />
+ {Platform.OS === 'android' ? <HeaderTitle root={root} /> : null}
</View>
+ <HeaderTitle root={root} />
<View
style={{
flexDirection: 'row',
alignItems: 'center',
+ position: 'absolute',
+ right: 12,
}}>
<Animatable.View
transition="opacity"
@@ -219,6 +224,7 @@ export const Header = ({showSearch, root}) => {
}}>
<TouchableOpacity
onPress={() => {
+ if (!hideHeader) return;
setHideHeader(false);
eSendEvent('showSearch');
}}