Commit 3e82715
[Local catalog] Add explicit local catalog flag to factory
- Add isLocalCatalogEnabled parameter to factory init
- Replace implicit GRDB presence check with explicit flag check
- Remove side-effecty localSearchStrategy helper method
- Add stub implementation for trackSearchLocalResultsFetchComplete
- Pass isLocalCatalogEligible flag when creating factories in POSTabCoordinator
- Convert lazy factory properties to factory methods with eligibility parameter
- Makes intent clear and improves testability
The factory now explicitly checks the isLocalCatalogEnabled flag
rather than relying on the presence of GRDBManager to determine
which search strategy to use. This makes the behavior more
predictable and testable.
The POSTabCoordinator now dynamically creates factories with the
current eligibility state each time POS is presented, ensuring
the correct search strategy is used based on real-time eligibility.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent a3af88b commit 3e82715
File tree
4 files changed
+35
-32
lines changed- Modules/Sources
- PointOfSale/Analytics
- Yosemite/PointOfSale/Items
- WooCommerce
- Classes/POS/TabBar
- WooCommerce.xcodeproj
4 files changed
+35
-32
lines changedLines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
46 | 55 | | |
Lines changed: 11 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | | - | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| |||
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
47 | 54 | | |
48 | 55 | | |
49 | 56 | | |
| |||
58 | 65 | | |
59 | 66 | | |
60 | 67 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | 68 | | |
82 | 69 | | |
83 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
55 | | - | |
56 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
57 | 59 | | |
58 | | - | |
59 | | - | |
60 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
| |||
230 | 234 | | |
231 | 235 | | |
232 | 236 | | |
233 | | - | |
234 | | - | |
| 237 | + | |
| 238 | + | |
235 | 239 | | |
236 | 240 | | |
237 | 241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16594 | 16594 | | |
16595 | 16595 | | |
16596 | 16596 | | |
| 16597 | + | |
16597 | 16598 | | |
16598 | 16599 | | |
16599 | 16600 | | |
| |||
17399 | 17400 | | |
17400 | 17401 | | |
17401 | 17402 | | |
| 17403 | + | |
17402 | 17404 | | |
17403 | 17405 | | |
17404 | 17406 | | |
| |||
17428 | 17430 | | |
17429 | 17431 | | |
17430 | 17432 | | |
| 17433 | + | |
17431 | 17434 | | |
17432 | 17435 | | |
17433 | 17436 | | |
| |||
0 commit comments