[FIX] Minor room header issues (#2630)

* Add hitSlop to RoomView header

* Use 1 icon padding for threads header

Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>
This commit is contained in:
Diego Mello 2020-11-12 11:22:53 -03:00 committed by GitHub
parent 8cac76601f
commit 264a5890b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -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}
>
<View style={styles.titleContainer}>
{tmid ? null : <Icon type={prid ? 'discussion' : type} status={status} roomUserId={roomUserId} theme={theme} />}

View File

@ -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',