|
@@ -65,11 +65,14 @@ class LifecycleScreen extends React.Component {
|
65
|
65
|
push = () => Navigation.push(this, Screens.Pushed);
|
66
|
66
|
screenPoppedEvent = async () => {
|
67
|
67
|
this.showUnmountAndDisappearAlerts = false;
|
68
|
|
- const unregister = Navigation.events().registerScreenPoppedListener((event) => {
|
69
|
|
- alert('Screen popped event')
|
70
|
|
- unregister.remove();
|
|
68
|
+ const promise = new Promise((resolve) => {
|
|
69
|
+ const unregister = Navigation.events().registerScreenPoppedListener((event) => {
|
|
70
|
+ alert('Screen popped event');
|
|
71
|
+ unregister.remove();
|
|
72
|
+ resolve();
|
|
73
|
+ });
|
71
|
74
|
});
|
72
|
|
- await Navigation.pop(this);
|
|
75
|
+ await Promise.all([Navigation.pop(this), promise]);
|
73
|
76
|
}
|
74
|
77
|
pop = () => Navigation.pop(this);
|
75
|
78
|
dismiss = () => Navigation.dismissModal(this);
|