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
limitis exceeded); - a
Signal<usize>unread_countthat increments on push and resets to zero onmark_all_read.
Two storage variants are supported via NotificationArchive:
InMemory— session-only.Persistent { path }— file-backed viaPersistedListModel. Apps install viaToastInstallOptions::archive = Some( NotificationArchive::persistent(...)); the registry’senqueuepush goes through the model and the on-disk file gets re-serialized on the shared teksilo-settings I/O thread.
Structs§
- Notification
Archive Model - Shared model — clones share state. Constructed by the install
helper from
NotificationArchive+AppPaths; apps reach it viactx.app_state::<Rc<NotificationArchiveModel>>().
Enums§
- Notification
Archive - Storage mode for the notification archive. Passed inside
ToastInstallOptions::archiveto the install helper. - Notification
Archive Error - 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_fileinto<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
NotificationUpdaterecords 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.