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

Notifications > Comments: fix notification selection issues #17978

Merged
merged 4 commits into from
Feb 18, 2022

Conversation

ScoutHarris
Copy link
Contributor

@ScoutHarris ScoutHarris commented Feb 17, 2022

Ref: #17790

This fixes two issues when selecting a Comment notification:

  1. On a fresh install, the app would do nothing and become unresponsive. This was due to createViewController:comment sometimes returning before fetchParentCommentIfNeeded was complete. This resulted in CommentDetailViewController being nil.

To resolve this, a completion block has been added to createViewController:comment so it doesn't return until the view controller is initialized.

  1. Comment details would be from the previously selected comment notification.

This has been resolved by clearing the previous notification's properties when a new notification is displayed.

To test:

  • Enable notificationCommentDetails.
  • Start with a fresh install to ensure no Comments are cached.
  • Go to Notifications > Comments.
  • Select a notification.
  • Verify the comment details view is displayed (and the app doesn't hang).
  • Go back to the Notifications list and select other comment notifications.
  • Verify the comment details are for the notification selected.

Regression Notes

  1. Potential unintended areas of impact
    N/A. Feature is disabled.

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    N/A

  3. What automated tests I added (or what prevented me from doing so)
    N/A

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Feb 17, 2022

You can test the Jetpack changes on this Pull Request by downloading it from AppCenter here with build number: pr17978-e621aa2. IPA is available here. If you need access to this, you can ask a maintainer to add you.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Feb 17, 2022

You can test the WordPress changes on this Pull Request by downloading it from AppCenter here with build number: pr17978-e621aa2. IPA is available here. If you need access to this, you can ask a maintainer to add you.

Copy link
Contributor

@dvdchr dvdchr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected, LGTM! :shipit:

Left some optional stylistic suggestions but I'll leave it up to your preference. 🙁

ScoutHarris and others added 2 commits February 18, 2022 10:00
…CommentDetailCoordinator.swift


Remove unnecessary `completion`.

Co-authored-by: David Christiandy <[email protected]>
…CommentDetailCoordinator.swift


Remove unnecessary `completion`.

Co-authored-by: David Christiandy <[email protected]>
@ScoutHarris
Copy link
Contributor Author

Thanks @dvdchr !

@ScoutHarris ScoutHarris merged commit 5487b89 into trunk Feb 18, 2022
@ScoutHarris ScoutHarris deleted the feature/17790-fix_comment_selection branch February 18, 2022 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants