[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:
Gung Wah 2021-04-01 22:09:02 +08:00 committed by GitHub
parent 8f0eae7a25
commit 632751898c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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({

View File

@ -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 ? (