@@ -161,16 +161,6 @@ class Dialog extends Component<DialogProps, DialogState> {
161
161
}
162
162
}
163
163
164
- // TODO: revert adding this workaround once RN fixes https://github.com/facebook/react-native/issues/29455
165
- onFadeDone = ( ) => {
166
- if ( ! this . state . modalVisibility ) {
167
- setTimeout ( ( ) => { // unfortunately this is needed if a modal needs to open on iOS
168
- _ . invoke ( this . props , 'onDialogDismissed' , this . props ) ;
169
- _ . invoke ( this . props , 'onModalDismissed' , this . props ) ;
170
- } , 50 ) ;
171
- }
172
- }
173
-
174
164
onDismiss = ( ) => {
175
165
this . setState ( { modalVisibility : false } , ( ) => {
176
166
const props = this . props ;
@@ -231,7 +221,6 @@ class Dialog extends Component<DialogProps, DialogState> {
231
221
const { useSafeArea, bottom, overlayBackgroundColor, testID} = this . props ;
232
222
const addBottomSafeArea = Constants . isIphoneX && ( useSafeArea && bottom ) ;
233
223
const bottomInsets = Constants . getSafeAreaInsets ( ) . bottom - 8 ; // TODO: should this be here or in the input style?
234
- const onFadeDone = Constants . isIOS ? this . onFadeDone : undefined ;
235
224
236
225
return (
237
226
< View
@@ -244,7 +233,6 @@ class Dialog extends Component<DialogProps, DialogState> {
244
233
modalVisibility = { modalVisibility }
245
234
dialogVisibility = { dialogVisibility }
246
235
overlayBackgroundColor = { overlayBackgroundColor }
247
- onFadeDone = { onFadeDone }
248
236
/>
249
237
{ this . renderDialogView ( ) }
250
238
{ addBottomSafeArea && < View style = { { marginTop : bottomInsets } } /> }
@@ -265,7 +253,7 @@ class Dialog extends Component<DialogProps, DialogState> {
265
253
animationType = { 'none' }
266
254
onBackgroundPress = { this . hideDialogView }
267
255
onRequestClose = { this . hideDialogView }
268
- // onDismiss={this.onModalDismissed}
256
+ onDismiss = { this . onModalDismissed }
269
257
supportedOrientations = { supportedOrientations }
270
258
accessibilityLabel = { accessibilityLabel }
271
259
>
0 commit comments