fix(calendar-sync) fixed pull to refresh on Calendar List mobile

This commit is contained in:
Calin Chitu 2022-02-22 16:39:32 +02:00 committed by Calinteodor
parent 0826ec16c2
commit 9651229a17
2 changed files with 12 additions and 22 deletions

View File

@ -4,7 +4,6 @@ import React from 'react';
import {
Text,
TouchableOpacity,
TouchableWithoutFeedback,
View
} from 'react-native';
@ -32,11 +31,6 @@ type Props = {
*/
disabled: boolean,
/**
* Callback to be invoked when pressing the list container.
*/
onListContainerPress?: boolean,
/**
* The translate function.
*/
@ -81,23 +75,20 @@ class CalendarList extends AbstractPage<Props> {
* @inheritdoc
*/
render() {
const { disabled, onListContainerPress } = this.props;
const { disabled } = this.props;
return (
CalendarListContent
? <TouchableWithoutFeedback
onPress = { onListContainerPress }>
<View
style = {
disabled
? styles.calendarSyncDisabled
: styles.calendarSync }>
<CalendarListContent
disabled = { disabled }
listEmptyComponent
= { this._getRenderListEmptyComponent() } />
</View>
</TouchableWithoutFeedback>
? <View
style = {
disabled
? styles.calendarSyncDisabled
: styles.calendarSync }>
<CalendarListContent
disabled = { disabled }
listEmptyComponent
= { this._getRenderListEmptyComponent() } />
</View>
: null
);
}

View File

@ -42,8 +42,7 @@ const WelcomePageTabs = ({ disabled, onListContainerPress }: Props) => {
const CalendarListScreen = useCallback(() =>
(<CalendarList
disabled = { disabled }
onListContainerPress = { onListContainerPress } />)
disabled = { disabled } />)
);
return (