@@ -2,11 +2,9 @@ import _ from 'lodash';
2
2
import PropTypes from 'prop-types' ;
3
3
import React , { Component , PureComponent } from 'react' ;
4
4
import { StyleSheet , Alert , FlatList } from 'react-native' ;
5
- import { gestureHandlerRootHOC } from 'react-native-gesture-handler' ;
6
5
import { Colors , ListItem , Text , Avatar , AvatarHelper , Drawer , Button } from 'react-native-ui-lib' ; //eslint-disable-line
7
6
import conversations from '../../data/conversations' ;
8
7
9
-
10
8
const collectionsIcon = require ( '../../assets/icons/collections.png' ) ;
11
9
const starIcon = require ( '../../assets/icons/star.png' ) ;
12
10
const shareIcon = require ( '../../assets/icons/share.png' ) ;
@@ -47,7 +45,7 @@ class ConversationListScreen extends Component {
47
45
icon : collectionsIcon ,
48
46
background : Colors . blue30 ,
49
47
onPress : ( ) => Alert . alert ( `Archive button pressed for item #${ item . name } ` )
50
- } ,
48
+ }
51
49
] ;
52
50
const leftButton = {
53
51
text : 'Read' ,
@@ -94,19 +92,19 @@ class ConversationListScreen extends Component {
94
92
95
93
addRef = ( ref , index ) => {
96
94
this . refArray [ index ] = ref ;
97
- }
95
+ } ;
98
96
99
97
onEndReached = ( ) => {
100
98
this . getNewItems ( ) ;
101
- }
99
+ } ;
102
100
103
101
onSwipeableWillOpen = ( props ) => {
104
102
this . closeLast ( props . index ) ;
105
- }
103
+ } ;
106
104
107
105
renderItem = ( { item, index} ) => {
108
- return < ContactItem item = { item } index = { index } addRef = { this . addRef } onSwipeableWillOpen = { this . onSwipeableWillOpen } />
109
- }
106
+ return < ContactItem item = { item } index = { index } addRef = { this . addRef } onSwipeableWillOpen = { this . onSwipeableWillOpen } /> ;
107
+ } ;
110
108
111
109
keyExtractor = ( item , index ) => `${ item . name } -${ index } ` ;
112
110
@@ -128,7 +126,7 @@ class ContactItem extends PureComponent {
128
126
index : PropTypes . number ,
129
127
addRef : PropTypes . func ,
130
128
onSwipeableWillOpen : PropTypes . func
131
- }
129
+ } ;
132
130
133
131
render ( ) {
134
132
const { item, index, addRef, onSwipeableWillOpen} = this . props ;
@@ -192,4 +190,4 @@ const styles = StyleSheet.create({
192
190
}
193
191
} ) ;
194
192
195
- export default gestureHandlerRootHOC ( ConversationListScreen ) ;
193
+ export default ConversationListScreen ;
0 commit comments