Commit 9c0b955
committed
msglist: Add and manage outbox message objects in message list view
This adds some overhead on message-event handling, linear in the
number of outbox messages in a view. We rely on that number being
small.
We add outboxMessages as a list independent from messages on
_MessageSequence. Because outbox messages are not rendered
(the raw content is shown as plain text), we leave the 1-1
relationship between `messages` and `contents` unchanged.
When computing `items`, we now start to look at `outboxMessages` as
well, with the guarantee that the items related to outbox messages
always come after those for other messages. Look for places that call
`_processOutboxMessage(int index)` for references, and the changes to
`checkInvariants` on how this affects the message list invariants.
`addOutboxMessage` is similar to `handleMessage`. However, outbox
messages do not rely on the fetched state, i.e. they can be
synchronously updated when the message list view was first
initialized.
This implements minimal support to display outbox message message item
widgets in the message list, without indicators for theirs states.
Retrieving content from failed sent requests and the full UI are
implemented in a later commit.1 parent d64698e commit 9c0b955
File tree
7 files changed
+921
-37
lines changed- lib
- model
- widgets
- test
- api/model
- model
- widgets
7 files changed
+921
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
| 397 | + | |
| 398 | + | |
397 | 399 | | |
398 | 400 | | |
399 | 401 | | |
| |||
0 commit comments