Skip to content

Fix discarded notification observers in a few places#21038

Merged
crazytonyli merged 3 commits intotrunkfrom
fix-last-discarded-notification-observers
Jul 18, 2023
Merged

Fix discarded notification observers in a few places#21038
crazytonyli merged 3 commits intotrunkfrom
fix-last-discarded-notification-observers

Conversation

@crazytonyli
Copy link
Copy Markdown
Contributor

Relates to #20994.

All the changed notification observers are registered once (on viewDidLoad or init), but discarded. This PR now uses the "self" instance as the observers, and NotificationCenter should automatically unregister them upon their deallocation.

Regression Notes

  1. Potential unintended areas of impact
    None.

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

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

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.

UI Changes testing checklist: N/A

@crazytonyli crazytonyli added this to the 22.9 milestone Jul 10, 2023
@crazytonyli crazytonyli requested review from jkmassel and mokagio July 10, 2023 04:19
@crazytonyli crazytonyli self-assigned this Jul 10, 2023
@wpmobilebot
Copy link
Copy Markdown
Contributor

WordPress Alpha📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr21038-02d11b2
Version22.7
Bundle IDorg.wordpress.alpha
Commit02d11b2
App Center BuildWPiOS - One-Offs #6266
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@wpmobilebot
Copy link
Copy Markdown
Contributor

Jetpack Alpha📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr21038-02d11b2
Version22.7
Bundle IDcom.jetpack.alpha
Commit02d11b2
App Center Buildjetpack-installable-builds #5290
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

Copy link
Copy Markdown
Contributor

@staskus staskus left a comment

Choose a reason for hiding this comment

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

👍 LGTM

@crazytonyli crazytonyli merged commit c874374 into trunk Jul 18, 2023
@crazytonyli crazytonyli deleted the fix-last-discarded-notification-observers branch July 18, 2023 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants