From 264a5890b4c93585ecad1972c8a9d8850fa8310e Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Thu, 12 Nov 2020 11:22:53 -0300 Subject: [PATCH] [FIX] Minor room header issues (#2630) * Add hitSlop to RoomView header * Use 1 icon padding for threads header Co-authored-by: Djorkaeff Alexandre --- app/views/RoomView/Header/Header.js | 4 ++++ app/views/RoomView/index.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/RoomView/Header/Header.js b/app/views/RoomView/Header/Header.js index 399318eb..637d57c5 100644 --- a/app/views/RoomView/Header/Header.js +++ b/app/views/RoomView/Header/Header.js @@ -10,6 +10,9 @@ import Icon from './Icon'; import { themes } from '../../../constants/colors'; import Markdown from '../../../containers/markdown'; +const HIT_SLOP = { + top: 5, right: 5, bottom: 5, left: 5 +}; const TITLE_SIZE = 16; const styles = StyleSheet.create({ container: { @@ -152,6 +155,7 @@ const Header = React.memo(({ onPress={onPress} style={styles.container} disabled={tmid} + hitSlop={HIT_SLOP} > {tmid ? null : } diff --git a/app/views/RoomView/index.js b/app/views/RoomView/index.js index b9d18599..7d3b656d 100644 --- a/app/views/RoomView/index.js +++ b/app/views/RoomView/index.js @@ -318,7 +318,7 @@ class RoomView extends React.Component { if (!room?.rid) { return; } - const headerTitlePosition = getHeaderTitlePosition({ insets, numIconsRight: 2 }); + const headerTitlePosition = getHeaderTitlePosition({ insets, numIconsRight: tmid ? 1 : 2 }); navigation.setOptions({ headerShown: true, headerTitleAlign: 'left',