@@ -144,7 +144,7 @@ export class PersistentBottomSheet extends AbsoluteLayout {
144
144
return false ;
145
145
}
146
146
let deltaY = 0 ;
147
- if ( global . isIOS && ! this . iosIgnoreSafeArea ) {
147
+ if ( __IOS__ && ! this . iosIgnoreSafeArea ) {
148
148
deltaY -= Utils . layout . toDeviceIndependentPixels ( this . getSafeAreaInsets ( ) . top ) ;
149
149
}
150
150
const y = data . y + deltaY ;
@@ -247,7 +247,7 @@ export class PersistentBottomSheet extends AbsoluteLayout {
247
247
this . _scrollView = value ;
248
248
249
249
if ( value ) {
250
- // if (global.isIOS ) {
250
+ // if (__IOS__ ) {
251
251
// (value.nativeViewProtected as UIScrollView).delaysContentTouches = true;
252
252
// }
253
253
value . on ( 'scroll' , this . onScroll , this ) ;
@@ -353,14 +353,14 @@ export class PersistentBottomSheet extends AbsoluteLayout {
353
353
}
354
354
}
355
355
private get scrollViewVerticalOffset ( ) {
356
- if ( global . isAndroid ) {
356
+ if ( __ANDROID__ ) {
357
357
return ( this . scrollView . nativeViewProtected as androidx . core . view . ScrollingView ) . computeVerticalScrollOffset ( ) / Utils . layout . getDisplayDensity ( ) ;
358
358
} else {
359
359
return ( this . scrollView . nativeViewProtected as UIScrollView ) . contentOffset . y ;
360
360
}
361
361
}
362
362
private set scrollViewVerticalOffset ( value : number ) {
363
- if ( global . isAndroid ) {
363
+ if ( __ANDROID__ ) {
364
364
( this . scrollView . nativeViewProtected as androidx . recyclerview . widget . RecyclerView ) . scrollTo ( 0 , 0 ) ;
365
365
} else {
366
366
( this . scrollView . nativeViewProtected as UIScrollView ) . contentOffset = CGPointMake ( this . scrollView . nativeViewProtected . contentOffset . x , 0 ) ;
@@ -381,9 +381,9 @@ export class PersistentBottomSheet extends AbsoluteLayout {
381
381
let touchY ;
382
382
// touch event gives you relative touch which varies with translateY
383
383
// so we use touch location in the window
384
- if ( global . isAndroid ) {
384
+ if ( __ANDROID__ ) {
385
385
touchY = Utils . layout . toDeviceIndependentPixels ( ( event . android as android . view . MotionEvent ) . getRawY ( ) ) ;
386
- } else if ( global . isIOS ) {
386
+ } else if ( __IOS__ ) {
387
387
touchY = ( event . ios . touches . anyObject ( ) as UITouch ) . locationInView ( null ) . y ;
388
388
}
389
389
if ( event . action === 'down' ) {
@@ -506,7 +506,7 @@ export class PersistentBottomSheet extends AbsoluteLayout {
506
506
return ;
507
507
}
508
508
this . animating = true ;
509
- if ( this . _scrollView && global . isAndroid ) {
509
+ if ( this . _scrollView && __ANDROID__ ) {
510
510
// on android we get unwanted scroll effect while "swipping the view"
511
511
// cancel the views touches before animation to prevent that
512
512
const time = Date . now ( ) ;
0 commit comments