Skip to content

feat: add removeAllClickListeners method to avoid keeping instances of all click listeners#1118

Open
ipapps wants to merge 1 commit intoOneSignal:mainfrom
ipapps:main
Open

feat: add removeAllClickListeners method to avoid keeping instances of all click listeners#1118
ipapps wants to merge 1 commit intoOneSignal:mainfrom
ipapps:main

Conversation

@ipapps
Copy link

@ipapps ipapps commented Feb 6, 2026

Description

One Line Summary

Add removeAllClickListeners method to avoid keeping instances of all click listeners

Details

Motivation

It is quite cumbersome to keep instances of all click listeners. Most of the time we have one, but need a simple way to remove it. By clearing all, it does the job just fine. Also, in state management, it prevents recreating click listeners when initializing method are fired multiple times.

Scope

Notification click listeners

Manual testing

Tested on my apps without any problem

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
    • If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
    • Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
  • I have reviewed this PR myself, ensuring it meets each checklist item
    • WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

This change is Reviewable

@ipapps ipapps requested a review from a team as a code owner February 6, 2026 14:49
@fadi-george fadi-george self-requested a review February 6, 2026 19:56
@fadi-george fadi-george changed the title Add removeAllClickListeners method to avoid keeping instances of all click listeners feat: add removeAllClickListeners method to avoid keeping instances of all click listeners Feb 6, 2026
@fadi-george
Copy link
Collaborator

Thanks for the pr, seems like a useful feature.
Will try to see if we can merge this next week.

@fadi-george
Copy link
Collaborator

I'll need to chat with other team members if it's something we want for all the wrapper sdks.

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.

2 participants

Comments