Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ class CartManager: ObservableObject {
init() {}

public func preloadCheckout() {
if let url = cart?.checkoutURL, isDirty {
ShopifyCheckoutKit.preload(checkout: url)
markCartAsReady()
}
// if let url = cart?.checkoutURL, isDirty {
// ShopifyCheckoutKit.preload(checkout: url)
// markCartAsReady()
// }
}

func markCartAsReady() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,9 @@ struct CartLines: View {
CartManager.shared.cart = cart
updating = nil

if let checkoutUrl = cart.checkoutURL {
ShopifyCheckoutKit.preload(checkout: checkoutUrl)
}
// if let checkoutUrl = cart.checkoutURL {
// ShopifyCheckoutKit.preload(checkout: checkoutUrl)
// }
}
},
label: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@ class CartViewController: UIViewController, UITableViewDelegate, UITableViewData

tableView.reloadData()

if let url = CartManager.shared.cart?.checkoutURL {
ShopifyCheckoutKit.preload(checkout: url)
}
// if let url = CartManager.shared.cart?.checkoutURL {
// ShopifyCheckoutKit.preload(checkout: url)
// }
}

// MARK: UITableViewDataSource
Expand Down Expand Up @@ -375,9 +375,9 @@ class CartViewController: UIViewController, UITableViewDelegate, UITableViewData
self.setupCheckoutButtonContent()
cell.quantityLabel.text = "\(cart.lines.nodes[indexPath.item].quantity)"

if let checkoutUrl = cart.checkoutURL {
ShopifyCheckoutKit.preload(checkout: checkoutUrl)
}
// if let checkoutUrl = cart.checkoutURL {
// ShopifyCheckoutKit.preload(checkout: checkoutUrl)
// }
}
}
return cell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public func configure(_ block: (inout Configuration) -> Void) {
block(&configuration)
}

/// Preloads the checkout for faster presentation.
public func preload(checkout url: URL) {
/// Public preload support is coming soon.
internal func preload(checkout url: URL) {
guard configuration.preloading.enabled else {
return
}
Expand Down
Loading