wordpress-mobile / WordPress-Android

WordPress for Android
http://android.wordpress.org
GNU General Public License v2.0
2.93k stars 1.31k forks source link

Deep Link: Edit Post - Fetch post from server if not available locally #12093

Open zwarm opened 4 years ago

zwarm commented 4 years ago

Expected behavior

The app currently handles deep links to open an existing post for editing. If the post does not exist in the local PostStore, the app should fetch the post from the server and open the post for editing.

The action to call for actually fetching the Post is fetchPost. https://github.com/wordpress-mobile/WordPress-FluxC-Android/blob/75050e8e588c95ea5ba836194ece8aa0011b8472/fluxc/src/main/java/org/wordpress/android/fluxc/store/PostStore.java#L620

While fetching the post, it will be necessary to show a loading indicator. A request for design input is required.

Actual behavior

If the post is not found in the local PostStore, the app will open a blank new post for the given site and a toast is shown stating that the "post is not found".

Steps to reproduce the behavior

adb shell am start \ -W -a android.intent.action.VIEW \ -c android.intent.category.BROWSABLE \ -d "wordpress://post?blogId=&postId="

Replace:

= your blogId = a postId on your site See #11911 for the Edit Post deep link implementation and discussion.
stale[bot] commented 3 years ago

This issue has been marked as stale because:

Please comment with an update if you believe this issue is still valid or if it can be closed. This issue will also be reviewed for validity and priority during regularly scheduled triage sessions.