@gphone/sdk
    Preparing search index...

    Function useNotifications

    • SDK Hook providing OS persistent notifications, unread counts, and management actions.

      Parameters

      • OptionalappId: string

      Returns {
          clear: (ids: number[]) => Promise<void>;
          clearAll: (targetAppId?: string) => Promise<void>;
          load: () => Promise<void>;
          loaded: Writable<boolean>;
          markRead: (ids: number[]) => Promise<void>;
          notificationsStore: Readable<NotificationItem[]>;
          totalUnread: Readable<number>;
          unreadCount: Readable<number>;
      }

      • clear: (ids: number[]) => Promise<void>
      • clearAll: (targetAppId?: string) => Promise<void>
      • load: () => Promise<void>
      • loaded: Writable<boolean>

        Shared across every caller: the shade is one list, so the first fetch is one fetch.

      • markRead: (ids: number[]) => Promise<void>
      • notificationsStore: Readable<NotificationItem[]>
      • totalUnread: Readable<number>
      • unreadCount: Readable<number>