some minor changes

This commit is contained in:
ammarahm-ed
2020-09-07 19:19:54 +05:00
parent 349860206b
commit 6a5cb75b1e
3 changed files with 8 additions and 7 deletions

View File

@@ -114,7 +114,7 @@ export default class NoteItem extends React.Component {
<Text <Text
numberOfLines={1} numberOfLines={1}
style={{ style={{
color: colors.pri, color: colors.heading,
fontSize: SIZE.sm + 1, fontSize: SIZE.sm + 1,
fontFamily: WEIGHT.bold, fontFamily: WEIGHT.bold,
maxWidth: '100%', maxWidth: '100%',

View File

@@ -10,16 +10,17 @@ import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import {br, WEIGHT, SIZE} from '../../common/common'; import {br, WEIGHT, SIZE} from '../../common/common';
import {TextInput, Text} from 'react-native'; import {TextInput, Text} from 'react-native';
const {Value, timing, block} = Animated; const {Value, timing, block} = Animated;
let offsetY = 0;
let searchResult = []; let searchResult = [];
let offsetY = 0;
let timeoutAnimate = null; let timeoutAnimate = null;
export const Search = props => { export const Search = (props) => {
const [state, dispatch] = useTracked(); const [state, dispatch] = useTracked();
const {colors, searchResults} = state; const {colors, searchResults} = state;
const [text, setText] = useState(''); const [text, setText] = useState('');
const [focus, setFocus] = useState(false); const [focus, setFocus] = useState(false);
const [hideHeader, setHideHeader] = useState(false);
let searchState = props.root ? state.searchState : state.indSearchState; let searchState = props.root ? state.searchState : state.indSearchState;
@@ -45,7 +46,7 @@ export const Search = props => {
}).start(); }).start();
}; };
const onScroll = y => { const onScroll = (y) => {
if (searchResults.results.length > 0) return; if (searchResults.results.length > 0) return;
if (y < 30) { if (y < 30) {
animation(0, 1, 1.5); animation(0, 1, 1.5);
@@ -112,7 +113,7 @@ export const Search = props => {
}; };
}, []); }, []);
const onChangeText = value => { const onChangeText = (value) => {
setText(value); setText(value);
}; };
const onSubmitEditing = async () => { const onSubmitEditing = async () => {

View File

@@ -48,7 +48,7 @@ const SimpleList = ({
const searchResults = {...state.searchResults}; const searchResults = {...state.searchResults};
const [refreshing, setRefreshing] = useState(false); const [refreshing, setRefreshing] = useState(false);
const insets = useSafeArea(); const insets = useSafeArea();
const _onScroll = event => { const _onScroll = (event) => {
if (!event) return; if (!event) return;
let y = event.nativeEvent.contentOffset.y; let y = event.nativeEvent.contentOffset.y;
eSendEvent(eScrollEvent, y); eSendEvent(eScrollEvent, y);