You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the page is uploaded and it needs to be refreshed to show the changes that took place, it should simply run a refresh from the database since it was updated and we are getting the completed event.
The function above could be renamed to fetchPagesFromServerAndRefreshUi to make it clear what it does, since it's possible that this bug was caused by reloadPages and refreshPages being close in name and intent.
Actual behavior
The entire page is basically reloaded; the page is re-fetched from the server which isn't necessary in this case.
Trigger an upload and if you put a breakpoint in the function below you will see that the pages are being fetched and the "local changes" if it exists will have a delay with being refreshed.
Expected behavior
When the page is uploaded and it needs to be refreshed to show the changes that took place, it should simply run a refresh from the database since it was updated and we are getting the completed event.
WordPress-Android/WordPress/src/main/java/org/wordpress/android/viewmodel/pages/PagesViewModel.kt
Line 210 in 1adbfd7
The function above could be renamed to
fetchPagesFromServerAndRefreshUito make it clear what it does, since it's possible that this bug was caused byreloadPagesandrefreshPagesbeing close in name and intent.Actual behavior
The entire page is basically reloaded; the page is re-fetched from the server which isn't necessary in this case.
Steps to reproduce the behavior
WordPress-Android/WordPress/src/main/java/org/wordpress/android/viewmodel/pages/PagesViewModel.kt
Line 210 in 1adbfd7
Tested on Google Pixel 3a, Android 10, WPAndroid #11191