Skip to content

Commit 5e4e396

Browse files
committed
Fix periphery issues
1 parent 42335af commit 5e4e396

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Modules/Sources/Yosemite/PointOfSale/Items/PointOfSaleLocalSearchPurchasableItemFetchStrategy.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ import protocol Storage.GRDBManagerProtocol
33
import protocol Networking.ProductVariationsRemoteProtocol
44

55
/// Fetch strategy for searching products in the local GRDB catalog using SQL LIKE queries
6-
public struct PointOfSaleLocalSearchPurchasableItemFetchStrategy: PointOfSalePurchasableItemFetchStrategy {
6+
struct PointOfSaleLocalSearchPurchasableItemFetchStrategy: PointOfSalePurchasableItemFetchStrategy {
77
private let siteID: Int64
88
private let searchTerm: String
99
private let grdbManager: GRDBManagerProtocol
10+
// periphery:ignore - Reserved for future variation fetching from remote when not in local catalog
1011
private let variationsRemote: ProductVariationsRemoteProtocol
1112
private let analytics: POSItemFetchAnalyticsTracking
1213
private let pageSize: Int
@@ -25,14 +26,14 @@ public struct PointOfSaleLocalSearchPurchasableItemFetchStrategy: PointOfSalePur
2526
self.pageSize = pageSize
2627
}
2728

28-
public var debounceStrategy: SearchDebounceStrategy {
29+
var debounceStrategy: SearchDebounceStrategy {
2930
// Use simple debouncing for local search: always debounce to prevent excessive queries
3031
// even though local searches are fast. 100ms provides responsive feel while preventing
3132
// queries on every keystroke. Delay loading indicators by 150ms to avoid flicker for fast queries.
3233
.simple(duration: 150 * NSEC_PER_MSEC, loadingDelayThreshold: 300 * NSEC_PER_MSEC)
3334
}
3435

35-
public func fetchProducts(pageNumber: Int) async throws -> PagedItems<POSProduct> {
36+
func fetchProducts(pageNumber: Int) async throws -> PagedItems<POSProduct> {
3637
let startTime = Date()
3738

3839
// Get total count and persisted products in one transaction
@@ -69,7 +70,7 @@ public struct PointOfSaleLocalSearchPurchasableItemFetchStrategy: PointOfSalePur
6970
totalItems: totalCount)
7071
}
7172

72-
public func fetchVariations(parentProductID: Int64, pageNumber: Int) async throws -> PagedItems<POSProductVariation> {
73+
func fetchVariations(parentProductID: Int64, pageNumber: Int) async throws -> PagedItems<POSProductVariation> {
7374
// Get total count and persisted variations in one transaction
7475
let (persistedVariations, totalCount) = try await grdbManager.databaseConnection.read { db in
7576
let totalCount = try PersistedProductVariation

Modules/Sources/Yosemite/PointOfSale/Items/PointOfSalePurchasableItemFetchStrategy.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ public struct PointOfSaleSearchPurchasableItemFetchStrategy: PointOfSalePurchasa
8080
self.analytics = analytics
8181
}
8282

83+
// periphery:ignore - Protocol requirement, used via protocol
8384
public var debounceStrategy: SearchDebounceStrategy {
8485
// Use smart debouncing for remote search: don't debounce first keystroke to show loading immediately,
8586
// then debounce subsequent keystrokes while search is ongoing.

0 commit comments

Comments
 (0)