Skip to content
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

Offline Support : Posts - Ensure PostListEventListener only receives post events. #11259

Open
jd-alexander opened this issue Feb 7, 2020 · 2 comments

Comments

@jd-alexander
Copy link
Contributor

jd-alexander commented Feb 7, 2020

Expected behavior

PostListEventListener with the dispatcher receives various events from FluxC. Since posts and pages are the same at the core, the PostListEventListener might end up processing events that arte meant for posts that are actually pages. So a !isPage should be added to filter out events that aren't related to posts.

Actual behavior

All events that are post related are consumed by the PostListEventListener even if they are pages.
N.B figure out a solution to do the same for media models from fun onEventBackgroundThread(event: UploadService.UploadMediaRetryEvent)

Steps to reproduce the behavior

  1. Enqueue both pages and posts while offline.
  2. Set a breakpoint within the PostListEventListener
  3. Go online and the breakpoint should be hit for both post and pages events. To verify, an event with a PostModel can be inspected to monitor the isPage property or a condition could be added to the breakpoint so it's only hit when a page is detected.
@malinajirka
Copy link
Contributor

Thanks @jd-alexander, we might want to consider removing this from the Offline Support project as it's technically not related to the project - we could put it to Groundskeeping. Wdyt?

@jd-alexander
Copy link
Contributor Author

That's a good idea. Thanks!

@jd-alexander jd-alexander added this to To Do in Groundskeeping via automation Feb 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Groundskeeping
  
To Do
Development

No branches or pull requests

2 participants