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

Refactor: Merge PushNotificationsManager and InteractiveNotificationsManager into one class #22944

Open
salimbraksa opened this issue Apr 3, 2024 · 1 comment

Comments

@salimbraksa
Copy link
Contributor

I came across the following comment while working on this issue:

// TODO:
// =====
// Refactor both PushNotificationsManager + InteractiveNotificationsManager:
//
//  -   InteractiveNotificationsManager should no longer be a singleton. Perhaps we could convert it into a struct.
//      Plus int should probably be renamed into something more meaningful (and match the new framework's naming)
//  -   New `NotificationsManager` class:
//      -   Would inherit `PushNotificationsManager.handleNotification`
//      -   Would deal with UserNotifications.framework
//      -   Would use InteractiveNotificationsManager!
//  -   Nuke `PushNotificationsManager`
//
//

We currently have two separate classes, PushNotificationsManager and InteractiveNotificationsManager, handling aspects of push notifications which could lead to unnecessary complexity. To address this, I propose merging them into a single class named PushNotificationsManager. The goal is to make sure the new, unified class keeps all the features of the original classes, streamlining the push notifications handling in our app and making it more straightforward.

@dangermattic
Copy link
Collaborator

Thanks for reporting! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants