Commit 05b2801
PR #1872 embedded directions into the home map and retired the standalone
TripPlanScreen, whose maybeRestoreFromIntent was the only consumer of the
trip-plan monitor's "your trip changed" notification intent. With that gone,
tapping the alert opened generic HOME instead of the changed trip: the intent
still carried the request bundle (copyIntoBundleSimple), the updated itineraries
(OTPConstants.ITINERARIES, JSON), and INTENT_SOURCE=NOTIFICATION, but nothing in
HOME read them.
Re-add the consumer in HomeActivity's launch-intent side-effect path, driving
the Activity-scoped VMs instead of the retired screen's: guard on
INTENT_SOURCE=NOTIFICATION, JSON-decode the itineraries, rehydrate the request
via TripRequestBuilder.initFromBundleSimple, then enterDirections() +
TripPlanViewModel.restoreFrom(...) to inject the precomputed itineraries as
PlanResult.Success without re-planning. The existing directions render path
(results sheet + map draw) reacts with no further changes; the producer side and
restoreFrom were already intact.
No re-restore guard is needed: the launch-intent channel submits each real
intent exactly once (cold onCreate seed, warm onNewIntent), so a config change
doesn't re-fire it. params=null (monitor not re-armed from the restore) matches
pre-#1872 behavior.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent f3bd405 commit 05b2801
1 file changed
Lines changed: 42 additions & 0 deletions
Lines changed: 42 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| |||
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
| 62 | + | |
58 | 63 | | |
59 | 64 | | |
60 | 65 | | |
| |||
213 | 218 | | |
214 | 219 | | |
215 | 220 | | |
| 221 | + | |
216 | 222 | | |
217 | 223 | | |
218 | 224 | | |
219 | 225 | | |
220 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
221 | 263 | | |
222 | 264 | | |
223 | 265 | | |
| |||
0 commit comments