Commit a9d8b65
committed
refactor(workflows): serve workflows from the config endpoint
WorkflowManager becomes a thin adapter over WorkflowsConfigProvider, which
reads the workflows topic through RemoteConfigManager's topic()/body() facade
instead of calling the backend per workflow. The old backend-per-workflow path
is fully removed: no Backend.getWorkflow, no CDN envelope resolution, no
WorkflowsCache reads, no stale-while-revalidate.
PublishedWorkflow no longer carries uiConfig — PaywallViewModel now fetches it
independently via awaitGetUiConfig() (added in the previous PR) and threads it
through workflow presentation directly.
OfferingsManager re-gains a WorkflowManager dependency and gates onSuccess on
WorkflowManager.awaitWorkflowsReady(), restoring the guarantee that getOfferings
doesn't return until workflow data is ready to query — the old code gated on
getWorkflowsList() for the same reason; that fetch no longer exists, so the gate
now forces the workflows topic to sync instead, which is a no-op on a warm
cache since RemoteConfigManager.topic() returns immediately once committed.1 parent 4a673d3 commit a9d8b65
22 files changed
Lines changed: 677 additions & 3103 deletions
File tree
- purchases/src
- defaults/kotlin/com/revenuecat/purchases
- main/kotlin/com/revenuecat/purchases
- common
- offerings
- workflows
- utils
- test/java/com/revenuecat/purchases
- common
- offerings
- workflows
- utils
- ui/revenuecatui/src
- main/kotlin/com/revenuecat/purchases/ui/revenuecatui
- data
- test/kotlin/com/revenuecat/purchases/ui/revenuecatui
- data
- workflow
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
439 | | - | |
| 439 | + | |
| 440 | + | |
440 | 441 | | |
441 | 442 | | |
442 | 443 | | |
| |||
Lines changed: 15 additions & 48 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | 47 | | |
50 | 48 | | |
| 49 | + | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
56 | | - | |
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
| |||
66 | 64 | | |
67 | 65 | | |
68 | 66 | | |
69 | | - | |
70 | 67 | | |
71 | 68 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | 69 | | |
77 | 70 | | |
78 | 71 | | |
| |||
86 | 79 | | |
87 | 80 | | |
88 | 81 | | |
89 | | - | |
90 | 82 | | |
91 | 83 | | |
92 | 84 | | |
| |||
275 | 267 | | |
276 | 268 | | |
277 | 269 | | |
278 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
279 | 276 | | |
280 | 277 | | |
281 | 278 | | |
| |||
386 | 383 | | |
387 | 384 | | |
388 | 385 | | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
415 | 394 | | |
416 | 395 | | |
417 | 396 | | |
| |||
578 | 557 | | |
579 | 558 | | |
580 | 559 | | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | 560 | | |
588 | 561 | | |
589 | 562 | | |
| |||
597 | 570 | | |
598 | 571 | | |
599 | 572 | | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | 573 | | |
607 | 574 | | |
608 | 575 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
617 | 617 | | |
618 | 618 | | |
619 | 619 | | |
620 | | - | |
621 | 620 | | |
622 | | - | |
623 | 621 | | |
624 | 622 | | |
625 | 623 | | |
626 | 624 | | |
627 | 625 | | |
628 | | - | |
| 626 | + | |
629 | 627 | | |
630 | 628 | | |
631 | 629 | | |
| |||
Lines changed: 2 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
162 | | - | |
| 161 | + | |
163 | 162 | | |
164 | 163 | | |
165 | 164 | | |
| |||
200 | 199 | | |
201 | 200 | | |
202 | 201 | | |
203 | | - | |
204 | | - | |
205 | 202 | | |
206 | 203 | | |
207 | 204 | | |
| |||
228 | 225 | | |
229 | 226 | | |
230 | 227 | | |
231 | | - | |
232 | | - | |
233 | 228 | | |
234 | 229 | | |
235 | 230 | | |
| |||
247 | 242 | | |
248 | 243 | | |
249 | 244 | | |
250 | | - | |
251 | | - | |
252 | 245 | | |
253 | 246 | | |
254 | 247 | | |
| |||
269 | 262 | | |
270 | 263 | | |
271 | 264 | | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
| 265 | + | |
279 | 266 | | |
280 | 267 | | |
281 | 268 | | |
| |||
0 commit comments