WordPress-iOS
WordPress-iOS copied to clipboard
Refactor: Merge `PushNotificationsManager` and `InteractiveNotificationsManager` into one class
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.
Thanks for reporting! 👍