Skip to content

Commit

Permalink
chore: Update getCurrentPrefersCrossFadeTransitionsState method to be…
Browse files Browse the repository at this point in the history
… optional
  • Loading branch information
gabrieldonadel committed Aug 19, 2022
1 parent 71632b4 commit 4ee496c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Libraries/Components/AccessibilityInfo/AccessibilityInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ const AccessibilityInfo = {
if (Platform.OS === 'android') {
return Promise.resolve(false);
} else {
if (NativeAccessibilityManagerIOS != null) {
if (
NativeAccessibilityManagerIOS?.getCurrentPrefersCrossFadeTransitionsState !=
null
) {
NativeAccessibilityManagerIOS.getCurrentPrefersCrossFadeTransitionsState(
resolve,
reject,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface Spec extends TurboModule {
onSuccess: (isReduceMotionEnabled: boolean) => void,
onError: (error: Object) => void,
) => void;
+getCurrentPrefersCrossFadeTransitionsState: (
+getCurrentPrefersCrossFadeTransitionsState?: (
onSuccess: (prefersCrossFadeTransitions: boolean) => void,
onError: (error: Object) => void,
) => void;
Expand Down

0 comments on commit 4ee496c

Please sign in to comment.