-
Notifications
You must be signed in to change notification settings - Fork 120
[Local catalog] Follow criteria for syncs #16281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e387d4e
fbbf8c0
50c50fa
6886c35
c86b6fd
a083191
044cef4
f22ea9e
6d8663e
35fabd9
a3d887f
0ab1fb5
e5023bc
d64f3f5
c28cb1f
c75ce3d
0645921
ebe90a2
654f89f
f6df1ce
a4e6207
80d776a
8394d94
1aae672
0e2e22b
1eae7e0
abadef0
5594f7a
a6de570
bc226bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see this one and |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| // Generated using Sourcery 2.2.6 — https://github.com/krzysztofzablocki/Sourcery | ||
| // DO NOT EDIT | ||
|
|
||
| // swiftlint:disable line_length | ||
|
|
||
| // swiftlint:enable line_length |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| // Generated using Sourcery 2.2.6 — https://github.com/krzysztofzablocki/Sourcery | ||
| // DO NOT EDIT | ||
|
|
||
| // swiftlint:disable line_length | ||
|
|
||
| // swiftlint:enable line_length |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ public enum POSLocalCatalogEligibilityState: Equatable { | |
|
|
||
| /// Reasons why local catalog is ineligible | ||
| public enum POSLocalCatalogIneligibleReason: Equatable { | ||
| case posTabNotVisible | ||
| case posTabNotEligible | ||
| case featureFlagDisabled | ||
| case catalogSizeTooLarge(totalCount: Int, limit: Int) | ||
| case catalogSizeCheckFailed(underlyingError: String) | ||
|
|
@@ -28,14 +28,19 @@ public enum POSLocalCatalogIneligibleReason: Equatable { | |
| /// NOTE: This service checks catalog-related eligibility (size limits) and feature flag state. | ||
| /// The service performs an initial eligibility check during initialization. | ||
| public protocol POSLocalCatalogEligibilityServiceProtocol { | ||
| /// Current eligibility state (synchronously accessible on main thread) | ||
| var eligibilityState: POSLocalCatalogEligibilityState { get } | ||
| /// Get catalog eligibility for a specific site | ||
| /// - Parameter siteID: The site ID to check eligibility for | ||
| /// - Returns: Cached eligibility state, or eligible if not yet checked | ||
| func catalogEligibility(for siteID: Int64) async -> POSLocalCatalogEligibilityState | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❓ Just for context: When we There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, that's right |
||
|
|
||
| /// Update the POS tab visibility state and refresh eligibility | ||
| /// - Parameter isPOSTabVisible: Whether the POS tab is visible | ||
| func updateVisibility(isPOSTabVisible: Bool) async | ||
| /// Update POS eligibility and refresh catalog eligibility for the specified site | ||
| /// - Parameters: | ||
| /// - isEligible: Whether POS is eligible for the site | ||
| /// - siteID: The site ID to refresh eligibility for | ||
| func updatePOSEligibility(isEligible: Bool, for siteID: Int64) async | ||
|
|
||
| /// Force refresh eligibility (bypasses cache and updates eligibilityState) | ||
| /// Refresh eligibility state for a specific site | ||
| /// - Parameter siteID: The site ID to check eligibility for | ||
| /// - Returns: Fresh eligibility state with reason if ineligible | ||
| @discardableResult func refreshEligibilityState() async -> POSLocalCatalogEligibilityState | ||
| @discardableResult func refreshEligibilityState(for siteID: Int64) async -> POSLocalCatalogEligibilityState | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to edit this directly from the template 💯