diff --git a/compose/app/build.gradle.kts b/compose/app/build.gradle.kts index c4ae0a6..3bec39d 100644 --- a/compose/app/build.gradle.kts +++ b/compose/app/build.gradle.kts @@ -75,7 +75,7 @@ detekt { dependencies { implementation("androidx.core:core-ktx:1.12.0") - implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2") + implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0") implementation("androidx.activity:activity-compose:1.8.2") implementation("androidx.compose.material:material:1.5.4") diff --git a/shopping/app/src/main/java/com/firework/example/shopping/AddToCartModeActivity.kt b/shopping/app/src/main/java/com/firework/example/shopping/AddToCartModeActivity.kt index d1e26f8..5dd709b 100644 --- a/shopping/app/src/main/java/com/firework/example/shopping/AddToCartModeActivity.kt +++ b/shopping/app/src/main/java/com/firework/example/shopping/AddToCartModeActivity.kt @@ -88,14 +88,14 @@ class AddToCartModeActivity : AppCompatActivity() { ShoppingViewOptions( theme = ShoppingTheme.DARK, productDetailsOptions = - ProductDetailsOptions( - linkButtonOptions = LinkButtonOptions(true), - shoppingCtaButtonOptions = ShoppingCtaButtonOptions(text = ShoppingCtaButtonOptions.Text.ADD_TO_CART), - ), + ProductDetailsOptions( + linkButtonOptions = LinkButtonOptions(true), + shoppingCtaButtonOptions = ShoppingCtaButtonOptions(text = ShoppingCtaButtonOptions.Text.ADD_TO_CART), + ), ), ) shopping.setShoppingCartBehaviour(Shopping.CartBehaviour.Embedded("some title")) - shopping.setOnCtaButtonClicked { productId, unitId, _ -> + shopping.setOnCtaButtonClicked { productId, unitId, _, _ -> uiScope.launch { FireworkSdk.shopping.setCtaButtonStatus(Shopping.CtaButtonStatus.Loading) delay(LONG_OPERATION_DELAY) @@ -122,7 +122,7 @@ class AddToCartModeActivity : AppCompatActivity() { ShoppingCartRepository.setProducts(hydratedProducts) } } - shopping.setOnProductLinkClickListener { _, _, productWebUrl -> + shopping.setOnProductLinkClickListener { _, _, productWebUrl, _ -> Toast.makeText( this@AddToCartModeActivity, "Host App: Product Url: $productWebUrl", diff --git a/shopping/app/src/main/java/com/firework/example/shopping/ShopNowModeActivity.kt b/shopping/app/src/main/java/com/firework/example/shopping/ShopNowModeActivity.kt index bb3ecbf..c5a2da1 100644 --- a/shopping/app/src/main/java/com/firework/example/shopping/ShopNowModeActivity.kt +++ b/shopping/app/src/main/java/com/firework/example/shopping/ShopNowModeActivity.kt @@ -81,13 +81,13 @@ class ShopNowModeActivity : AppCompatActivity(), Shopping.OnShoppingErrorListene ShoppingViewOptions( theme = ShoppingTheme.DARK, productDetailsOptions = - ProductDetailsOptions( - linkButtonOptions = LinkButtonOptions(false), - shoppingCtaButtonOptions = ShoppingCtaButtonOptions(text = ShoppingCtaButtonOptions.Text.SHOP_NOW), - ), + ProductDetailsOptions( + linkButtonOptions = LinkButtonOptions(false), + shoppingCtaButtonOptions = ShoppingCtaButtonOptions(text = ShoppingCtaButtonOptions.Text.SHOP_NOW), + ), ), ) - shopping.setOnCtaButtonClicked { _, _, productWebUrl -> + shopping.setOnCtaButtonClicked { _, _, productWebUrl, _ -> val webpage: Uri = Uri.parse(productWebUrl) val intent = Intent(Intent.ACTION_VIEW, webpage).apply {