File tree 5 files changed +17
-13
lines changed
5 files changed +17
-13
lines changed Original file line number Diff line number Diff line change 1
- # Changelog (Current version: 1.2.3)
1
+ # Changelog (Current version: 1.2.4)
2
+
3
+ ### Version 1.2.4
4
+
5
+ News
6
+ - Fix close event not responding well
2
7
3
8
### Version 1.2.3
4
9
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " react-native-netwatch" ,
3
- "version" : " 1.2.3 " ,
3
+ "version" : " 1.2.4 " ,
4
4
"description" : " Network traffic logger for React Native" ,
5
5
"homepage" : " https://github.com/odemolliens/react-native-netwatch" ,
6
6
"main" : " src/index.tsx" ,
Original file line number Diff line number Diff line change @@ -209,13 +209,11 @@ export const Main = (props: IProps) => {
209
209
return (
210
210
< >
211
211
< Appbar . Header style = { [ styles . header , { backgroundColor : theme . secondaryDarkColor } ] } >
212
- < TouchableOpacity style = { [ styles . button , { borderLeftWidth : 0 } ] } >
213
- < FeatherIcon
214
- name = "x"
215
- color = { theme . textColorOne }
216
- size = { 24 }
217
- onPress = { ( ) => ( settingsVisible ? setSettingsVisible ( false ) : props . onPressClose ( false ) ) }
218
- />
212
+ < TouchableOpacity
213
+ style = { [ styles . button , { borderLeftWidth : 0 } ] }
214
+ onPress = { ( ) => ( settingsVisible ? setSettingsVisible ( false ) : props . onPressClose ( false ) ) }
215
+ >
216
+ < FeatherIcon name = "x" color = { theme . textColorOne } size = { 24 } />
219
217
</ TouchableOpacity >
220
218
< Appbar . Content color = { theme . primaryColor } title = "Netwatch" titleStyle = { { fontSize : 18 } } />
221
219
{ loadingXLSX ? (
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import ReduxAction from '../../Core/Objects/ReduxAction';
5
5
import { RNRequest } from '../../Core/Objects/RNRequest' ;
6
6
import { EnumFilterType , EnumSourceType } from '../../types' ;
7
7
import NRequest from '../../Core/Objects/NRequest' ;
8
- import { Alert } from 'react-native' ;
8
+ import { Alert , TouchableOpacity } from 'react-native' ;
9
9
import Share from 'react-native-share' ;
10
10
11
11
describe ( 'Main test suite' , ( ) => {
@@ -181,7 +181,8 @@ describe('Main test suite', () => {
181
181
jest . spyOn ( React , 'useState' ) . mockImplementation ( useStateMock ) ;
182
182
givenProps ( ) ;
183
183
givenComponent ( ) ;
184
- component . find ( '[name="x"]' ) . simulate ( 'press' ) ;
184
+ // @ts -ignore
185
+ component . find ( TouchableOpacity ) . first ( ) . props ( ) . onPress ( ) ;
185
186
expect ( props . onPressClose ) . toHaveBeenCalledTimes ( 1 ) ;
186
187
expect ( props . onPressClose ) . toHaveBeenCalledWith ( false ) ;
187
188
} ) ;
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ exports[`Main test suite Tests source should render properly 1`] = `
20
20
}
21
21
>
22
22
<ForwardRef
23
+ onPress = { [Function ]}
23
24
style = {
24
25
Array [
25
26
Object {
@@ -38,7 +39,6 @@ exports[`Main test suite Tests source should render properly 1`] = `
38
39
<Icon
39
40
color = " #F9FAFB"
40
41
name = " x"
41
- onPress = { [Function ]}
42
42
size = { 24 }
43
43
/>
44
44
</ForwardRef >
@@ -220,6 +220,7 @@ exports[`Main test suite should render properly and showSettings 1`] = `
220
220
}
221
221
>
222
222
<ForwardRef
223
+ onPress = { [Function ]}
223
224
style = {
224
225
Array [
225
226
Object {
@@ -238,7 +239,6 @@ exports[`Main test suite should render properly and showSettings 1`] = `
238
239
<Icon
239
240
color = " #F9FAFB"
240
241
name = " x"
241
- onPress = { [Function ]}
242
242
size = { 24 }
243
243
/>
244
244
</ForwardRef >
You can’t perform that action at this time.
0 commit comments