@@ -336,17 +336,17 @@ export class View extends ViewCommon {
336
336
}
337
337
}
338
338
339
- on ( eventNames : string , callback : ( data : EventData ) => void , thisArg ?: any ) {
340
- super . on ( eventNames , callback , thisArg ) ;
339
+ addEventListener ( eventNames : string , callback : ( data : EventData ) => void , thisArg ?: any ) {
340
+ super . addEventListener ( eventNames , callback , thisArg ) ;
341
341
const isLayoutEvent = typeof eventNames === 'string' ? eventNames . indexOf ( ViewCommon . layoutChangedEvent ) !== - 1 : false ;
342
342
343
343
if ( this . isLoaded && ! this . layoutChangeListenerIsSet && isLayoutEvent ) {
344
344
this . setOnLayoutChangeListener ( ) ;
345
345
}
346
346
}
347
347
348
- off ( eventNames : string , callback ?: ( data : EventData ) => void , thisArg ?: any ) {
349
- super . off ( eventNames , callback , thisArg ) ;
348
+ removeEventListener ( eventNames : string , callback ?: ( data : EventData ) => void , thisArg ?: any ) {
349
+ super . removeEventListener ( eventNames , callback , thisArg ) ;
350
350
const isLayoutEvent = typeof eventNames === 'string' ? eventNames . indexOf ( ViewCommon . layoutChangedEvent ) !== - 1 : false ;
351
351
352
352
// Remove native listener only if there are no more user listeners for LayoutChanged event
@@ -687,13 +687,13 @@ export class View extends ViewCommon {
687
687
// if the app is in background while triggering _showNativeModalView
688
688
// then DialogFragment.show will trigger IllegalStateException: Can not perform this action after onSaveInstanceState
689
689
// so if in background we create an event to call _showNativeModalView when loaded (going back in foreground)
690
- if ( Application . inBackground && ! parent . isLoaded ) {
691
- const onLoaded = ( ) => {
692
- parent . off ( 'loaded' , onLoaded )
693
- this . _showNativeModalView ( parent , options ) ;
694
- } ;
695
- parent . on ( 'loaded' , onLoaded ) ;
696
- return ;
690
+ if ( Application . inBackground && ! parent . isLoaded ) {
691
+ const onLoaded = ( ) => {
692
+ parent . off ( 'loaded' , onLoaded ) ;
693
+ this . _showNativeModalView ( parent , options ) ;
694
+ } ;
695
+ parent . on ( 'loaded' , onLoaded ) ;
696
+ return ;
697
697
}
698
698
super . _showNativeModalView ( parent , options ) ;
699
699
initializeDialogFragment ( ) ;
0 commit comments