[FIX] Search input not using the whole header space (#3012)
* [FIX] Search input not using the whole space * Fix on getHeaderTitlePosition Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
parent
8f0eae7a25
commit
632751898c
|
@ -23,7 +23,7 @@ export const getHeaderHeight = (isLandscape) => {
|
|||
|
||||
export const getHeaderTitlePosition = ({ insets, numIconsRight }) => ({
|
||||
left: insets.left + 60,
|
||||
right: insets.right + (45 * numIconsRight)
|
||||
right: insets.right + Math.max(45 * numIconsRight, 15)
|
||||
});
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
|
|
|
@ -319,7 +319,7 @@ class RoomsListView extends React.Component {
|
|||
getHeader = () => {
|
||||
const { searching } = this.state;
|
||||
const { navigation, isMasterDetail, insets } = this.props;
|
||||
const headerTitlePosition = getHeaderTitlePosition({ insets, numIconsRight: 3 });
|
||||
const headerTitlePosition = getHeaderTitlePosition({ insets, numIconsRight: searching ? 0 : 3 });
|
||||
return {
|
||||
headerTitleAlign: 'left',
|
||||
headerLeft: () => (searching ? (
|
||||
|
|
Loading…
Reference in New Issue