Skip to content

Commit

Permalink
Upgrade Android dependency, add support for invalidate function
Browse files Browse the repository at this point in the history
  • Loading branch information
markmur committed Oct 24, 2024
1 parent cf0968e commit 6e0cf89
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ ndkVersion=23.1.7779620
buildToolsVersion = "33.0.0"

# Version of Shopify Checkout SDK to use with React Native
SHOPIFY_CHECKOUT_SDK_VERSION=3.0.4
SHOPIFY_CHECKOUT_SDK_VERSION=3.2.0
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ public void preload(String checkoutURL) {
}
}

@ReactMethod
public void invalidateCache() {
ShopifyCheckoutSheetKit.invalidate();
}

private ColorScheme getColorScheme(String colorScheme) {
switch (colorScheme) {
case "web_default":
Expand Down
1 change: 1 addition & 0 deletions sample/src/screens/CartScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ function CartScreen(): React.JSX.Element {

const presentCheckout = async () => {
if (checkoutURL) {
ShopifyCheckout.invalidate();
ShopifyCheckout.present(checkoutURL);
}
};
Expand Down

0 comments on commit 6e0cf89

Please sign in to comment.