✨ feat(notification): implement notification center with persistent storage and DND support

This commit is contained in:
sankalp committed 2025-08-02 19:25:33 +05:45
1 parent 2e7207c4ac
commit 30ca6de913
15 files changed
+1260 -472

No files matched your search

+27 -13
View File
@@ -1,27 +1,41 @@
import sys
from loguru import logger
from fabric.audio import Audio
from services.modus import ModusService
from services.modus import ModusService, notification_service as notification_service_instance
global modus_service
try:
modus_service = ModusService()
except Exception as e:
logger.error("[Main] Failed to create ModusService:", e)
sys.exit(1)
logger.error(f"[Main] Failed to create ModusService: {e}")
modus_service = None
# global notification_service
# try:
# notification_service = Notifications()
# except Exception as e:
# logger.error("[Main] Failed to create NotificationService:", e)
# sys.exit(1)
if modus_service is None:
logger.warning(
"[Main] ModusService was not initialized. Functionality may be limited."
)
global notification_service
try:
notification_service = notification_service_instance
except Exception as e:
logger.error(f"[Main] Failed to create NotificationService: {e}")
notification_service = None
if notification_service is None:
logger.warning(
"[Main] NotificationService was not initialized. Notifications may not work."
)
global audio_service
try:
audio_service = Audio()
except Exception as e:
logger.error("[Main] Failed to create AudioService:", e)
sys.exit(1)
logger.error(f"[Main] Failed to create AudioService: {e}")
audio_service = None
if audio_service is None:
logger.warning(
"[Main] AudioService was not initialized. Audio features may not work."
)