Reconstructing Notify module

This commit is contained in:
houseme
2025-06-19 15:40:48 +08:00
parent e6b019c29d
commit c658d88d25
51 changed files with 5845 additions and 4469 deletions
+12
View File
@@ -0,0 +1,12 @@
use crate::NotificationSystem;
use once_cell::sync::Lazy;
use std::sync::Arc;
static NOTIFICATION_SYSTEM: Lazy<Arc<NotificationSystem>> =
Lazy::new(|| Arc::new(NotificationSystem::new()));
/// Returns the handle to the global NotificationSystem instance.
/// This function can be called anywhere you need to interact with the notification system。
pub fn notification_system() -> Arc<NotificationSystem> {
NOTIFICATION_SYSTEM.clone()
}