Chime.Live.State (Chime v0.1.0-dev)

Copy Markdown View Source

The @chime assign:

  • :recipient - the person's id, or nil for nobody;
  • :workspace - the workspace of the page, from the resolver's resolve_workspace/1, or nil for the whole feed;
  • :unseen and :unread - their counts, of the workspace with one;
  • :open - whether the panel is open; :items - its notifications, each %{id:, notification:, feed:}, the feed as the notifier renders it; :more - whether there are more; :filter - :inbox or :unread;
  • :limit - the notifications of a page.

Summary

Types

t()

@type t() :: %Chime.Live.State{
  filter: :inbox | :unread,
  items: [map()],
  limit: pos_integer(),
  more: boolean(),
  open: boolean(),
  recipient: String.t() | nil,
  unread: non_neg_integer(),
  unseen: non_neg_integer(),
  workspace: String.t() | nil
}