Commit 69bae84
Simplify capability handling in ChatViewModel.messagesFlow
spreedCapabilities was only needed inside the terminal map step of
messagesFlow (to filter system messages for channels), but it was
being combined into the outer flatMapLatest trigger. Any capabilities
emission unrelated to the conversation forced the whole message
source subscription to cancel and restart.
Move the capabilities dependency to a dedicated isChannelFlow
(conversationAndUserFlow + spreedCapabilities -> Boolean, with
distinctUntilChanged), and combine only that into the innermost step.
handleSystemMessages() now takes a plain Boolean instead of
ConversationModel/SpreedCapability, making it simpler to reason about
and test.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>1 parent a50d4bc commit 69bae84
1 file changed
Lines changed: 11 additions & 12 deletions
Lines changed: 11 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
499 | 504 | | |
500 | 505 | | |
501 | 506 | | |
| |||
511 | 516 | | |
512 | 517 | | |
513 | 518 | | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
| 519 | + | |
| 520 | + | |
518 | 521 | | |
519 | 522 | | |
520 | 523 | | |
| |||
533 | 536 | | |
534 | 537 | | |
535 | 538 | | |
536 | | - | |
537 | | - | |
| 539 | + | |
| 540 | + | |
538 | 541 | | |
539 | 542 | | |
540 | 543 | | |
| |||
1369 | 1372 | | |
1370 | 1373 | | |
1371 | 1374 | | |
1372 | | - | |
1373 | | - | |
1374 | | - | |
1375 | | - | |
1376 | | - | |
1377 | | - | |
| 1375 | + | |
| 1376 | + | |
1378 | 1377 | | |
1379 | 1378 | | |
1380 | 1379 | | |
| |||
0 commit comments