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
The current behaviour—where the app deletes older posts and only keep three on the device—seems a bit strange to me.
Expected behavior
Loaded posts should not be deleted after switching to the Home screen.
Actual behavior
Older posts are deleted after switching to the Home screen.
Steps to reproduce the behavior
Navigate to Posts screen and create 6 or more draft posts.
Go to the root of My Sites tab (or the Home screen on iPad).
Scroll through the home screen, or pull to refresh. Wait for a couple of seconds.
Go back to the Posts screen. At this point, you should only see 3 drafts displayed on screen, but quickly after all drafts are re-fetched and displayed.
PostsCardViewModel (and PagesCardViewModel) performs sync upon refreshing corresponding card cell. You can check out this behaviour by adding a log to the syncing post code and simply scrolling through the My Sites tab.
IMO, I don't think we should perform a post sync when the user just scrolls the screen.
Issue 2
In the sync posts (and pages) call, the purgesLocalSync option is set to true, which causes older posts being deleted from the device.
@hassaanelgarem The issue 1 mentioned in #21754 (comment) is still there. I'll leave it up to you to decided if it warrants a fix. I can close this issue and open a new one that's dedicated to the "issue 1", if you think that'll help making things clearer.
The current behaviour—where the app deletes older posts and only keep three on the device—seems a bit strange to me.
Expected behavior
Loaded posts should not be deleted after switching to the Home screen.
Actual behavior
Older posts are deleted after switching to the Home screen.
Steps to reproduce the behavior
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2023-10-13.at.14.35.31.mp4
Tested on [device], iOS [version], Jetpack iOS / WordPress iOS [version]
The trunk branch. 32404ca
The text was updated successfully, but these errors were encountered: