use TouchableOpacity instead of TouchableWithoutFeedback for the unread filter

This commit is contained in:
Elias Nahum
2022-06-03 12:17:27 -04:00
parent fa14f93e3f
commit bf427c700e
2 changed files with 29 additions and 20 deletions

View File

@@ -442,6 +442,7 @@ exports[`components/categories_list should render team error 1`] = `
>
<View
accessible={true}
collapsable={false}
focusable={true}
onClick={[Function]}
onResponderGrant={[Function]}
@@ -451,25 +452,33 @@ exports[`components/categories_list should render team error 1`] = `
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Array [
Object {
"alignItems": "center",
"backgroundColor": "rgba(255,255,255,0.12)",
"borderRadius": 8,
"height": 40,
"justifyContent": "center",
"marginVertical": 20,
"width": 40,
},
false,
]
Object {
"opacity": 1,
}
}
>
<Icon
color="rgba(255,255,255,0.56)"
name="filter-variant"
size={24}
/>
<View
style={
Array [
Object {
"alignItems": "center",
"backgroundColor": "rgba(255,255,255,0.12)",
"borderRadius": 8,
"height": 40,
"justifyContent": "center",
"marginVertical": 20,
"width": 40,
},
false,
]
}
>
<Icon
color="rgba(255,255,255,0.56)"
name="filter-variant"
size={24}
/>
</View>
</View>
</View>
<View

View File

@@ -2,7 +2,7 @@
// See LICENSE.txt for license information.
import React from 'react';
import {TouchableWithoutFeedback, View} from 'react-native';
import {TouchableOpacity, View} from 'react-native';
import {showUnreadChannelsOnly} from '@actions/local/channel';
import CompassIcon from '@components/compass_icon';
@@ -39,7 +39,7 @@ const UnreadFilter = ({onlyUnreads}: Props) => {
};
return (
<TouchableWithoutFeedback onPress={onPress}>
<TouchableOpacity onPress={onPress}>
<View style={[styles.container, onlyUnreads && styles.filtered]}>
<CompassIcon
color={changeOpacity(onlyUnreads ? theme.sidebarBg : theme.sidebarText, 0.56)}
@@ -47,7 +47,7 @@ const UnreadFilter = ({onlyUnreads}: Props) => {
size={24}
/>
</View>
</TouchableWithoutFeedback>
</TouchableOpacity>
);
};