This pr adds support for changing tab initialisation mode. Currently bottom tabs are attached together and consequently, their corresponding react root views are created and rendered. This adds lots of stress on the js thread and hiders app start time. To mitigate this issue, this pr adds support for three modes * `together` (default, current behaviour) - all tabs are loaded together, adding unnecessary load on the js thread as we're loading invisible views, which leads to increased app start time. * `afterInitialTab` - Initial tab is loaded first. After it is rendered, other tabs are loaded as well. This should shave a few hunderdish ms from app start time. Since other tabs are loaded after the initial tab is visible, the ui might be unresponsive for a few hunderdish ms as multiple root views (which are typically complex) are being created and attached to hierarchy at once. * `onSwitchToTab` - initial tab is loaded. Other tabs are loaded when switching to them (tab click or programmatically). While this won't stress js thread after initial tab is rendered, there will be a flicker when entering a tab for the first time as it's ui isn't ready.
|
||
34 | 34 |
|
35 | 35 |
|
36 | 36 |
|
37 |
|
|
37 | 38 |
|
38 | 39 |
|
39 | 40 |
|
|
||
47 | 48 |
|
48 | 49 |
|
49 | 50 |
|
51 |
|
|
50 | 52 |
|
51 | 53 |
|
52 | 54 |
|
|
||
58 | 60 |
|
59 | 61 |
|
60 | 62 |
|
63 |
|
|
61 | 64 |
|
62 | 65 |
|
63 | 66 |
|
|
||
69 | 72 |
|
70 | 73 |
|
71 | 74 |
|
75 |
|
|
72 | 76 |
|
73 | 77 |
|
74 | 78 |
|
|
||
16 | 16 |
|
17 | 17 |
|
18 | 18 |
|
19 |
|
|
19 | 20 |
|
20 | 21 |
|
21 | 22 |
|
|
||
193 | 194 |
|
194 | 195 |
|
195 | 196 |
|
197 |
|
|
196 | 198 |
|
197 | 199 |
|
198 | 200 |
|
|
||
201 | 203 |
|
202 | 204 |
|
203 | 205 |
|
204 |
|
|
206 |
|
|
207 |
|
|
205 | 208 |
|
206 | 209 |
|
207 | 210 |
|
|
||
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
||
12 | 12 |
|
13 | 13 |
|
14 | 14 |
|
15 |
|
|
15 |
|
|
16 | 16 |
|
17 | 17 |
|
18 | 18 |
|
|
||
69 | 69 |
|
70 | 70 |
|
71 | 71 |
|
72 |
|
|
73 |
|
|
74 |
|
|
75 |
|
|
72 | 76 |
|
73 | 77 |
|
74 | 78 |
|
75 | 79 |
|
76 | 80 |
|
77 | 81 |
|
82 |
|
|
83 |
|
|
84 |
|
|
85 |
|
|
86 |
|
|
87 |
|
|
88 |
|
|
89 |
|
|
90 |
|
|
91 |
|
|
92 |
|
|
78 | 93 |
|
79 | 94 |
|
80 | 95 |
|
|
||
25 | 25 |
|
26 | 26 |
|
27 | 27 |
|
28 |
|
|
28 | 29 |
|
29 | 30 |
|
30 | 31 |
|
32 |
|
|
33 |
|
|
31 | 34 |
|
32 | 35 |
|
33 |
|
|
36 |
|
|
34 | 37 |
|
35 | 38 |
|
36 | 39 |
|
|
||
47 | 50 |
|
48 | 51 |
|
49 | 52 |
|
50 |
|
|
53 |
|
|
51 | 54 |
|
52 | 55 |
|
53 | 56 |
|
|
||
77 | 80 |
|
78 | 81 |
|
79 | 82 |
|
80 |
|
|
81 |
|
|
83 |
|
|
84 |
|
|
85 |
|
|
86 |
|
|
87 |
|
|
88 |
|
|
82 | 89 |
|
83 | 90 |
|
84 | 91 |
|
|
||
199 | 206 |
|
200 | 207 |
|
201 | 208 |
|
202 |
|
|
209 |
|
|
203 | 210 |
|
204 | 211 |
|
205 |
|
|
206 |
|
|
212 |
|
|
213 |
|
|
207 | 214 |
|
208 | 215 |
|
209 | 216 |
|
|
||
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
||
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
|
|
61 |
|
|
62 |
|
|
||
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
||
38 | 38 |
|
39 | 39 |
|
40 | 40 |
|
41 |
|
|
41 | 42 |
|
42 | 43 |
|
43 | 44 |
|
44 |
|
|
45 |
|
|
45 | 46 |
|
46 | 47 |
|
47 | 48 |
|
48 | 49 |
|
50 |
|
|
49 | 51 |
|
50 | 52 |
|
51 | 53 |
|
|
||
63 | 65 |
|
64 | 66 |
|
65 | 67 |
|
68 |
|
|
66 | 69 |
|
67 | 70 |
|
68 | 71 |
|
|
||
70 | 73 |
|
71 | 74 |
|
72 | 75 |
|
73 |
|
|
76 |
|
|
74 | 77 |
|
75 | 78 |
|
76 | 79 |
|
|
||
155 | 158 |
|
156 | 159 |
|
157 | 160 |
|
158 |
|
|
159 |
|
|
160 |
|
|
161 |
|
|
162 |
|
|
163 |
|
|
164 |
|
|
165 |
|
|
166 |
|
|
167 |
|
|
168 |
|
|
169 | 161 |
|
170 | 162 |
|
171 | 163 |
|
|
||
176 | 168 |
|
177 | 169 |
|
178 | 170 |
|
171 |
|
|
172 |
|
|
173 |
|
|
174 |
|
|
175 |
|
|
176 |
|
|
179 | 177 |
|
180 | 178 |
|
179 |
|
|
181 | 180 |
|
182 | 181 |
|
183 | 182 |
|
|
||
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
||
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
||
44 | 44 |
|
45 | 45 |
|
46 | 46 |
|
47 |
|
|
47 |
|
|
48 | 48 |
|
49 | 49 |
|
50 | 50 |
|
51 | 51 |
|
52 | 52 |
|
53 |
|
|
53 |
|
|
54 | 54 |
|
55 | 55 |
|
56 | 56 |
|
|
||
31 | 31 |
|
32 | 32 |
|
33 | 33 |
|
34 |
|
|
34 |
|
|
35 | 35 |
|
36 | 36 |
|
37 | 37 |
|
|
||
162 | 162 |
|
163 | 163 |
|
164 | 164 |
|
165 |
|
|
165 |
|
|
166 | 166 |
|
167 | 167 |
|
168 | 168 |
|
|
||
25 | 25 |
|
26 | 26 |
|
27 | 27 |
|
28 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
29 | 31 |
|
30 | 32 |
|
31 | 33 |
|
|
||
19 | 19 |
|
20 | 20 |
|
21 | 21 |
|
22 |
|
|
23 |
|
|
24 |
|
|
22 | 25 |
|
23 | 26 |
|
24 | 27 |
|
|
||
42 | 45 |
|
43 | 46 |
|
44 | 47 |
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
45 | 52 |
|
46 | 53 |
|
47 | 54 |
|
48 | 55 |
|
49 | 56 |
|
50 | 57 |
|
58 |
|
|
59 |
|
|
60 |
|
|
61 |
|
|
51 | 62 |
|
52 | 63 |
|
53 | 64 |
|
|
||
13 | 13 |
|
14 | 14 |
|
15 | 15 |
|
16 |
|
|
16 | 17 |
|
17 | 18 |
|
18 | 19 |
|
|
||
47 | 48 |
|
48 | 49 |
|
49 | 50 |
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
|
|
61 |
|
|
50 | 62 |
|
|
||
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
||
1 |
|
|
1 |
|
|
2 | 2 |
|
3 | 3 |
|
4 | 4 |
|
|
||
24 | 24 |
|
25 | 25 |
|
26 | 26 |
|
27 |
|
|
27 |
|
|
28 |
|
|
28 | 29 |
|
29 | 30 |
|
30 | 31 |
|
|
||
66 | 67 |
|
67 | 68 |
|
68 | 69 |
|
70 |
|
|
69 | 71 |
|
70 | 72 |
|
71 | 73 |
|
|
||
88 | 90 |
|
89 | 91 |
|
90 | 92 |
|
93 |
|
|
91 | 94 |
|
92 | 95 |
|
93 | 96 |
|
|
||
241 | 244 |
|
242 | 245 |
|
243 | 246 |
|
247 |
|
|
244 | 248 |
|
245 |
|
|
249 |
|
|
246 | 250 |
|
247 | 251 |
|
248 | 252 |
|
|
||
252 | 256 |
|
253 | 257 |
|
254 | 258 |
|
259 |
|
|
255 | 260 |
|
256 | 261 |
|
257 | 262 |
|
|
||
340 | 345 |
|
341 | 346 |
|
342 | 347 |
|
348 |
|
|
349 |
|
|
350 |
|
|
351 |
|
|
352 |
|
|
353 |
|
|
354 |
|
|
355 |
|
|
356 |
|
|
357 |
|
|
358 |
|
|
359 |
|
|
343 | 360 |
|
344 | 361 |
|
345 | 362 |
|
|
||
372 | 389 |
|
373 | 390 |
|
374 | 391 |
|
392 |
|
|
375 | 393 |
|
376 | 394 |
|
377 | 395 |
|
|
||
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
||
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
|
|
61 |
|
|
62 |
|
|
63 |
|
|
64 |
|
|
65 |
|
|
66 |
|
|
67 |
|
|
68 |
|
|
69 |
|
|
70 |
|
|
71 |
|
|
72 |
|
|
73 |
|
|
74 |
|
|
75 |
|
|
76 |
|
|
77 |
|
|
78 |
|
|
79 |
|
|
80 |
|
|
||
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
||
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
||
138 | 138 |
|
139 | 139 |
|
140 | 140 |
|
141 |
|
|
141 |
|
|
142 | 142 |
|
143 | 143 |
|
144 | 144 |
|
|
||
28 | 28 |
|
29 | 29 |
|
30 | 30 |
|
31 |
|
|
31 | 32 |
|
32 | 33 |
|
33 | 34 |
|
|
||
350 | 351 |
|
351 | 352 |
|
352 | 353 |
|
353 |
|
|
354 |
|
|
355 |
|
|
354 | 356 |
|
355 | 357 |
|
356 | 358 |
|
|
||
106 | 106 |
|
107 | 107 |
|
108 | 108 |
|
109 |
|
|
109 |
|
|
110 | 110 |
|
111 | 111 |
|
112 | 112 |
|
|
||
203 | 203 |
|
204 | 204 |
|
205 | 205 |
|
206 |
|
|
206 |
|
|
207 | 207 |
|
208 | 208 |
|
209 | 209 |
|
|
||
989 | 989 |
|
990 | 990 |
|
991 | 991 |
|
992 |
|
|
993 | 992 |
|
994 | 993 |
|
995 | 994 |
|
|
||
445 | 445 |
|
446 | 446 |
|
447 | 447 |
|
448 |
|
|
449 |
|
|
450 |
|
|
451 |
|
|
452 |
|
|
448 | 453 |
|
449 | 454 |
|
450 | 455 |
|