JDStatusBarNotification
JDStatusBarNotification copied to clipboard
Implementing to handle multiple notification
Here's what the implementation involves:
- NotificationQueue: A new class that manages a queue of notifications:
- Maintains a FIFO queue of notifications
- Ensures notifications are presented sequentially
- Handles automatic dismissal with duration
- Manages the state of currently presenting notifications
- NotificationPresenter Changes:
- Added a notification queue instance
- Modified presentation methods to utilize the queue
- Updated dismissal to function with the queue
- Maintains backward compatibility with the existing API
- SwiftUI Integration:
- Updated the SwiftUI modifier to operate with the queue
- Improved state tracking for multiple notifications
- Enhanced handling of notification IDs and state management