My Notifications - xopherdeep/do-it-for-the-xp GitHub Wiki

My Notifications

Overview

Heroes receive notifications for quest approvals, rejections, blood moons, level ups, and power events.

Notification Indicators

  • Avatar Circle: When the hero has unread notifications, a danger badge appears on the top right of the hero's avatar circle in the HUD (XpFabUserHud).
  • RPG Menu Item: The Notifications item within the hero's action menu reflects the identical unread badge count.
  • Count Formatting: Unread counts above 99 display as 99+. If there are no unread notifications, no badge is displayed.

Feed & Management

  • Tapping the Notifications item opens the XpNotifications modal styled with the Phone App Kit (xp-app--retro / xp-app--modern).
  • Header: Displays the notification title, bell icon, unread status summary ("X unread" or "All caught up"), dismiss button, and shortcut to Notification Settings.
  • Feed Organization: Notifications are grouped into clean sections ("New" vs "Earlier" or "Recent") with xp-app-row items.
  • Row Elements: Each item features a color-coded duotone icon tile, title, message body, unread indicator dot, category chip (e.g., Quest Due, Approved, Level Up), relative timestamp chip, and quick trailing actions (Mark Read checkmark, Delete trash).
  • Footer Controls: The bottom xp-app-bar offers quick filter pills ("All" vs "Unread") and bulk actions ("Mark Read" and "Clear").

OS & Background Delivery

  • Notification Channels (Android):
    • battle-alerts: High importance (sound and heads-up) for ambush alerts and beast encounters while away.
    • chore-reminders: Default importance for upcoming chore deadlines and due notices.
  • Background & Away Encounters:
    • On leaving the application, the encounter clock calculates the exact timestamp for the next random encounter and pre-schedules an OS alert via Capacitor Local Notifications.
    • On return, pending alerts are cleared from the tray and the ambush triggers immediately. Overdue chore ambushes name both the beast and the chore.
⚠️ **GitHub.com Fallback** ⚠️