Skip to content

Commit

Permalink
[Patch 2.0.1] Fix issue with external links causing a crash (#78)
Browse files Browse the repository at this point in the history
* Fix issue with external links causing a crash

* Patch + changelog
  • Loading branch information
markmur authored Apr 4, 2024
1 parent 4fca5e4 commit 25d4098
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 2.0.1 - April 4, 2024

- Fixes an issue where opening `mailto` links externally causes the application
to crash.

## 2.0.0 - March 21, 2024

### Updated dependencies
Expand All @@ -16,7 +21,8 @@
file on iOS, a `res/values/strings.xml` on Android or using the `title`
attribute on the ShopifyCheckoutSheetKit configuration.

> [!IMPORTANT]
<!-- prettier-ignore -->
> [!IMPORTANT]
> The `title` attribute on the configuration will configure iOS _only_.
```diff
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ public void removeListeners(Integer count) {
public void present(String checkoutURL) {
Activity currentActivity = getCurrentActivity();
if (currentActivity instanceof ComponentActivity) {
Context appContext = getReactApplicationContext();
DefaultCheckoutEventProcessor checkoutEventProcessor = new CustomCheckoutEventProcessor(appContext, this.reactContext);
DefaultCheckoutEventProcessor checkoutEventProcessor = new CustomCheckoutEventProcessor(currentActivity,
this.reactContext);
currentActivity.runOnUiThread(() -> {
ShopifyCheckoutSheetKit.present(checkoutURL, (ComponentActivity) currentActivity,
checkoutEventProcessor);
checkoutEventProcessor);
});
}
}
Expand Down Expand Up @@ -174,7 +174,7 @@ private Colors createColorsFromConfig(ReadableMap config) {
webViewBackground,
headerBackground,
headerFont,
progressIndicator);
progressIndicator);
}

return null;
Expand Down
2 changes: 1 addition & 1 deletion modules/@shopify/checkout-sheet-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@shopify/checkout-sheet-kit",
"license": "MIT",
"version": "2.0.0",
"version": "2.0.1",
"main": "lib/commonjs/index.js",
"types": "src/index.ts",
"source": "src/index.ts",
Expand Down

0 comments on commit 25d4098

Please sign in to comment.