Skip to main content

Module archive

Module archive 

Source
Expand description

NotificationArchiveModel — the persistent list backing NotificationLog and the bell-icon badge.

Wraps a ListModel<NotificationEntry> with two extras:

  • bounded eviction (oldest entries drop when the configured limit is exceeded);
  • a Signal<usize> unread_count that increments on push and resets to zero on mark_all_read.

Two storage variants are supported via NotificationArchive:

  • InMemory — session-only.
  • Persistent { path } — file-backed via PersistedListModel. Apps install via ToastInstallOptions::archive = Some( NotificationArchive::persistent(...)); the registry’s enqueue push goes through the model and the on-disk file gets re-serialized on the shared teksilo-settings I/O thread.

Structs§

NotificationArchiveModel
Shared model — clones share state. Constructed by the install helper from NotificationArchive + AppPaths; apps reach it via ctx.app_state::<Rc<NotificationArchiveModel>>().

Enums§

NotificationArchive
Storage mode for the notification archive. Passed inside ToastInstallOptions::archive to the install helper.
NotificationArchiveError
Errors during archive construction or persistence I/O.

Constants§

ARCHIVE_FILE_NAME
File-name (without extension) used for the persistent archive. Resolved through AppPaths::config_file into <config_dir>/<app>/notifications.toml.
DEFAULT_ARCHIVE_LIMIT
Default per-archive entry cap. IntelliJ’s notification log keeps hundreds of entries with no cap visible to the user; we pick a pragmatic limit so persistent files don’t grow unbounded.
UPDATE_HISTORY_LIMIT
How many NotificationUpdate records one row keeps. A progress notice that reports each step in its wording records one update per step, and an id an app reuses for every run of an operation gathers them from every run, so a row keeps the most recent ones and drops the oldest. The row itself always shows the notice as it now stands, whatever the history kept.