|
@@ -31,7 +31,7 @@ class ModalScreen extends Component {
|
31
|
31
|
{this.props.previousModalIds ? (<Button title="Dismiss ALL Previous Modals" onPress={this.onClickDismissAllPreviousModals} />) : undefined}
|
32
|
32
|
{this.props.previousModalIds ? (<Button title="Dismiss First In Stack" onPress={this.onClickDismissFirstInStack} />) : undefined}
|
33
|
33
|
<Text style={styles.footer}>{`this.props.id = ${this.props.id}`}</Text>
|
34
|
|
-
|
|
34
|
+
|
35
|
35
|
</View>
|
36
|
36
|
);
|
37
|
37
|
}
|
|
@@ -53,26 +53,23 @@ class ModalScreen extends Component {
|
53
|
53
|
onClickDismissPreviousModal() {
|
54
|
54
|
Navigation.dismissModal(this.getPreviousModalId());
|
55
|
55
|
}
|
56
|
|
-
|
|
56
|
+
|
57
|
57
|
onClickDismissUnknownModal() {
|
58
|
58
|
Navigation.dismissModal('unknown');
|
59
|
59
|
}
|
60
|
|
-
|
|
60
|
+
|
61
|
61
|
onClickDismissAllPreviousModals() {
|
62
|
62
|
_.forEach(this.props.previousModalIds, (id) => Navigation.dismissModal(id));
|
63
|
63
|
}
|
64
|
|
-
|
65
|
|
-
|
|
64
|
+
|
66
|
65
|
onClickDismissFirstInStack() {
|
67
|
|
- console.log('RANG', 'getFirstInStackModalId', _.head(this.props.previousModalIds));;
|
68
|
66
|
Navigation.dismissModal(_.head(this.props.previousModalIds));
|
69
|
67
|
}
|
70
|
68
|
|
71
|
|
-
|
72
|
69
|
getModalPosition() {
|
73
|
70
|
return (this.props.modalPosition || 1);
|
74
|
71
|
}
|
75
|
|
-
|
|
72
|
+
|
76
|
73
|
getPreviousModalId() {
|
77
|
74
|
return _.last(this.props.previousModalIds);
|
78
|
75
|
}
|