Closed ThomazFB closed 3 weeks ago
App Name | WooCommerce-Wear Android | |
Platform | βοΈ Wear OS | |
Flavor | Jalapeno | |
Build Type | Debug | |
Commit | 3e6ebf290f4a3c419246a3eb4e368d5c7014f539 | |
Direct Download | woocommerce-wear-prototype-build-pr12834-3e6ebf2.apk |
π² You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
App Name | WooCommerce Android | |
Platform | π± Mobile | |
Flavor | Jalapeno | |
Build Type | Debug | |
Commit | 3e6ebf290f4a3c419246a3eb4e368d5c7014f539 | |
Direct Download | woocommerce-prototype-build-pr12834-3e6ebf2.apk |
This pull request was deployed and Sentry observed the following issues:
com.woocommerce.android.ui.products.list.Produc...
View IssueDid you find this useful? React with a π or π
Why
Fix issue #12777 by introducing to the Product List awareness about when a product is being trashed.
The root cause of the issue is how the trashing action doesn't trigger an immediate event. It takes a few seconds to actually trigger the trashing to allow the user to
undo
the trashing from the Product List warning.Due to this problem, it's possible to swipe to refresh while the trashing is not confirmed, causing the product to be reloaded from the store API and reappear in the Product list.
How
To solve this, two adjustments to the product list were necessary.
First, while the
undo
action is available to the user, the swipe to refresh is disabled. This shouldn't affect the user since it's disabled for a couple of seconds, and after the trashing is done, the Product List will be refreshed anyway.This leads to the second adjustment: Once the trashing is confirmed, the Product List will be refreshed, and any subsequent swipe to refresh will be enqueued waiting for the Trashing request to finish. Loading the products from database will also be disabled, to avoid getting outdated data while the trashing request is not finished.
Screen Capture
Before
https://github.com/user-attachments/assets/8ef29003-0900-4baf-bf20-e3b6129d48c7
After
https://github.com/user-attachments/assets/b294e87c-6977-4b8b-ba6d-a89a9637c650
How to Test
Trash Product
optionUpdate release notes:
RELEASE-NOTES.txt
if necessary.Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: