|
@@ -16,6 +16,7 @@ import com.reactnativenavigation.R;
|
16
|
16
|
import com.reactnativenavigation.activities.BaseReactActivity;
|
17
|
17
|
import com.reactnativenavigation.controllers.ModalController;
|
18
|
18
|
import com.reactnativenavigation.core.objects.Screen;
|
|
19
|
+import com.reactnativenavigation.utils.ContextProvider;
|
19
|
20
|
import com.reactnativenavigation.utils.SdkSupports;
|
20
|
21
|
import com.reactnativenavigation.utils.StyleHelper;
|
21
|
22
|
import com.reactnativenavigation.views.RctView;
|
|
@@ -93,6 +94,11 @@ public class RnnModal extends Dialog implements DialogInterface.OnDismissListene
|
93
|
94
|
@Override
|
94
|
95
|
public void onDismiss(DialogInterface dialog) {
|
95
|
96
|
ModalController.getInstance().remove();
|
96
|
|
- StyleHelper.updateStyles(mToolBar, getCurrentScreen());
|
|
97
|
+ // After modal is dismissed, update Toolbar with screen from parent activity or previously displayed modal
|
|
98
|
+ BaseReactActivity context = ContextProvider.getActivityContext();
|
|
99
|
+ if (context != null) {
|
|
100
|
+ Screen currentScreen = context.getCurrentScreen();
|
|
101
|
+ StyleHelper.updateStyles(mToolBar, currentScreen);
|
|
102
|
+ }
|
97
|
103
|
}
|
98
|
104
|
}
|