From 632751898c34168acc1162a6de053226c64daee7 Mon Sep 17 00:00:00 2001 From: Gung Wah <41157464+kresnaputra@users.noreply.github.com> Date: Thu, 1 Apr 2021 22:09:02 +0800 Subject: [PATCH] [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 --- app/containers/Header/index.js | 2 +- app/views/RoomsListView/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/containers/Header/index.js b/app/containers/Header/index.js index ca734c6ed..4663c7d43 100644 --- a/app/containers/Header/index.js +++ b/app/containers/Header/index.js @@ -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({ diff --git a/app/views/RoomsListView/index.js b/app/views/RoomsListView/index.js index 2c634cf52..a0b3984e6 100644 --- a/app/views/RoomsListView/index.js +++ b/app/views/RoomsListView/index.js @@ -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 ? (