Skip to content

Commit fd772ee

Browse files
authored
Fixing DialogModule for Android SDK version before 26 (#285)
* Fixing DialogModule for Android SDK version before 26 * Adding a comment Adding a comment .. as a workaround to retrigger Apple PR Co-authored-by: Anandraj Govindan <[email protected]>
1 parent 058aa0b commit fd772ee

File tree

1 file changed

+5
-5
lines changed
  • android-patches/patches-droid-office-grouped/DialogModule/ReactAndroid/src/main/java/com/facebook/react/modules/dialog

1 file changed

+5
-5
lines changed

android-patches/patches-droid-office-grouped/DialogModule/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/DialogModule.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@ public void showPendingAlert() {
8888
- if (arguments.containsKey(KEY_CANCELABLE)) {
8989
- alertFragment.setCancelable(arguments.getBoolean(KEY_CANCELABLE));
9090
+ if(isUsingPlatformFragmentManager()) {
91-
+ PlatformAlertFragment PlatformAlertFragment = new PlatformAlertFragment(actionListener, arguments);
92-
+ if (mIsInForeground && !mPlatformFragmentManager.isStateSaved()) {
91+
+ PlatformAlertFragment platformAlertFragment = new PlatformAlertFragment(actionListener, arguments);
92+
+ if (mIsInForeground) { // isStateSaved not available in sdk v25 and lower
9393
+ if (arguments.containsKey(KEY_CANCELABLE)) {
94-
+ PlatformAlertFragment.setCancelable(arguments.getBoolean(KEY_CANCELABLE));
94+
+ platformAlertFragment.setCancelable(arguments.getBoolean(KEY_CANCELABLE));
9595
+ }
96-
+ PlatformAlertFragment.show(mPlatformFragmentManager, FRAGMENT_TAG);
96+
+ platformAlertFragment.show(mPlatformFragmentManager, FRAGMENT_TAG);
9797
+ } else {
98-
+ mFragmentToShow = PlatformAlertFragment;
98+
+ mFragmentToShow = platformAlertFragment;
9999
}
100100
- alertFragment.show(mFragmentManager, FRAGMENT_TAG);
101101
} else {

0 commit comments

Comments
 (0)