-
Notifications
You must be signed in to change notification settings - Fork 133
[POS][Local Catalog] Run incremental sync on splash screen #14675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[POS][Local Catalog] Run incremental sync on splash screen #14675
Conversation
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #14675 +/- ##
=========================================
Coverage 38.37% 38.38%
- Complexity 9824 9825 +1
=========================================
Files 2093 2093
Lines 116745 116747 +2
Branches 15622 15622
=========================================
+ Hits 44806 44810 +4
+ Misses 67780 67779 -1
+ Partials 4159 4158 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…n-payment' into woomob-1405-woo-poslocal-catalog-run-incremental-sync-on-pos-splash
…ental-sync-on-pos-splash
init { | ||
val splashScreenStartTime = System.currentTimeMillis() | ||
|
||
performIncrementalSyncUseCase.execute(WooPosIncrementalSyncReason.ON_SPLASH_SCREEN) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn’t it be blocking? I mean, shouldn’t we display a splash screen until the process is complete? Or what’s the plan here? Currently, every time I open the POS for the first time, it shows an empty list of products.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. The plan is to make the incremental sync non-blocking in general. However, in the next PR, I'm going to add a check if the full sync is required, which will handle cases like POS opened for the first time (empty local catalog). In case the full sync was never performed before, or the catalog is empty, the full sync will be required and will block an access to POS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I left one non-blocking question
WOOMOB-1405
Description
This PR performs incremental sync on the POS splash screen.
Steps to reproduce
On the POS splash screen, the incremental sync should start. Sync should be non-blocking.
Testing information
The tests that have been performed
Above
Images/gif
N/A
RELEASE-NOTES.txt
if necessary. Use the "[Internal]" label for non-user-facing changes.