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 split view: set selected Notification after removing moderated #18002

Merged
merged 3 commits into from
Feb 22, 2022

Conversation

ScoutHarris
Copy link
Contributor

Ref: #17790

This fixes an issue where, in split view, the Notification details could still be shown after the first Notification is removed from the list.

The problem was that selectFirstNotificationIfAppropriate was selecting the notification before it was updated. Now, instead of just clearing selectedNotification, syncNotificationsWithModeratedComments finds the next available notification and sets it as the selectedNotification.

Also, there is some code cleanup - the CommentDetailViewController protocols have been renamed to be more accurate.

To test:

  • In split view, go to Notifications.
  • Trash/spam the first comment in the list.
  • While still viewing the comment, navigate away from Notifications (ex: tap My Site or Reader tab).
  • Come back to Notifications.
  • Verify the Notification is removed from the list, the next Notification is selected, and the details updates accordingly.

Regression Notes

  1. Potential unintended areas of impact
    N/A

  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

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

@wpmobilebot
Copy link
Contributor

You can test the WordPress changes on this Pull Request by downloading it from AppCenter here with build number: pr18002-cce66cb. 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.

LGTM! :shipit:

@ScoutHarris
Copy link
Contributor Author

Thanks @dvdchr !

@ScoutHarris ScoutHarris merged commit bfdec22 into trunk Feb 22, 2022
@ScoutHarris ScoutHarris deleted the feature/17790-split_view_details branch February 22, 2022 19:10
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