Skip to content

Commit

Permalink
Update Loading and Error visibilities
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomazFB committed Jan 2, 2025
1 parent 9e09365 commit 5029816
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class WooShippingLabelPackageCreationFragment : BaseFragment() {
progressDialog = CustomProgressDialog.show(
title = getString(R.string.loading),
message = getString(R.string.please_wait)
)
).also { it.show(parentFragmentManager, CustomProgressDialog.TAG) }
} else {
progressDialog?.dismiss()
progressDialog = null
Expand All @@ -98,15 +98,10 @@ class WooShippingLabelPackageCreationFragment : BaseFragment() {
titleId = R.string.woo_shipping_labels_package_creation_error_title,
messageId = R.string.woo_shipping_labels_package_creation_error_message,
positiveButtonId = R.string.woo_shipping_labels_package_creation_error_proceed,
neutralButtonId = R.string.woo_shipping_labels_package_creation_error_retry,
negativeButtonId = R.string.woo_shipping_labels_package_creation_error_cancel,
neutralButtonId = R.string.woo_shipping_labels_package_creation_error_cancel,
posBtnAction = { _, _ ->
viewModel.onAddCustomPackageClick(savePackageAsTemplate = false)
},
neutBtAction = { _, _ ->
viewModel.onAddCustomPackageClick(savePackageAsTemplate = true)
}

)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ class WooShippingLabelPackageCreationViewModel @Inject constructor(
?.let { sendCustomPackageToStore(it, customPackage) }
?.fold(
onSuccess = {
triggerEvent(ShowLoadingDialog(false))
triggerEvent(PackageSelected(customPackage.toPackageData()))
},
onFailure = {
Expand Down
3 changes: 1 addition & 2 deletions WooCommerce/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4448,9 +4448,8 @@
<string name="woo_shipping_labels_package_creation_box_type">Box</string>
<string name="woo_shipping_labels_package_creation_envelope_type">Envelope</string>
<string name="woo_shipping_labels_package_creation_error_title">We couldn\'t save the package as template</string>
<string name="woo_shipping_labels_package_creation_error_message">Do you want to proceed without saving as a template?</string>
<string name="woo_shipping_labels_package_creation_error_message">Do you want to proceed without saving it?</string>
<string name="woo_shipping_labels_package_creation_error_proceed">Proceed</string>
<string name="woo_shipping_labels_package_creation_error_retry">Retry</string>
<string name="woo_shipping_labels_package_creation_error_cancel">Cancel</string>
<string name="email_not_registered_wpcom">Hmm, we can\'t find a WordPress.com account connected to this email address.</string>
</resources>

0 comments on commit 5029816

Please sign in to comment.