Commit ec86230
authored
fix(Android, Stack v5): update stack model after native pop (#3599)
## Description
Currently when doing native pop, the `stackModel` stored in
`StackContainer`
is never updated, therefore leading to an incorrect state held (natively
dismissed fragments are never removed from the state).
This PR changes that.
## Changes
Currently I remove them from the state in `onFragmentDestroyView`,
and it seems to work, however I'm not sure, this is the perfect
place timing-wise. This callback is called only after fragment's
view is destroyed, which might be pretty late in component
lifecycle, and we might execute container operations still taking
into consideration possibly removed screens. We need to look into
that later.
## Before & after - visual documentation
N/A
## Test plan
Only sensible way to test this is to add logging in `StackContainer`
and dismiss few screens natively, and see that the state is updated
(with this fix).
## Checklist
- [x] Ensured that CI passes1 parent 523a736 commit ec86230
1 file changed
Lines changed: 17 additions & 4 deletions
Lines changed: 17 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
23 | 31 | | |
24 | 32 | | |
25 | 33 | | |
| |||
67 | 75 | | |
68 | 76 | | |
69 | 77 | | |
| 78 | + | |
| 79 | + | |
70 | 80 | | |
71 | 81 | | |
72 | 82 | | |
| |||
81 | 91 | | |
82 | 92 | | |
83 | 93 | | |
84 | | - | |
| 94 | + | |
85 | 95 | | |
86 | 96 | | |
87 | 97 | | |
| |||
97 | 107 | | |
98 | 108 | | |
99 | 109 | | |
100 | | - | |
| 110 | + | |
101 | 111 | | |
102 | 112 | | |
103 | 113 | | |
| |||
115 | 125 | | |
116 | 126 | | |
117 | 127 | | |
118 | | - | |
| 128 | + | |
119 | 129 | | |
120 | 130 | | |
121 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
122 | 135 | | |
123 | 136 | | |
124 | 137 | | |
| |||
0 commit comments