Closed rowellx68 closed 8 years ago
EDIT: This causes a noticeable flicker on an actual device and it could even result on the modal to be dismissed.
Forked the project and modified it to be like the one above: https://github.com/rowellx68/react-native-controllers/commit/11201351bc923000a68e80b48a0e9be4ed6867a2
Found a workaround.
_stateChange (val) {
if (val === 'inactive') {
Modal.dismissController('none');
setTimeout(() => {
Modal.showController('myapp.Controller.Locked', 'none');
}, 10);
}
}
I dismiss the current modal first, then show it again after a timeout. Not particularly elegant.
react-native-controllers v2.0.2
In one of my components, I have the following code
Everytime the AppSate is
inactive
, the modal gets shown even if themyapp.Controller.Locked
is already showing on screen.Maybe the
Controllers
could keep track of the shown component and not show it again?