Commit 95c1b5a
smc: _resolveAndEmit isClosed guard + honest 'session' stat label
Two Copilot fixes (+ a third pushback in the reply):
1. _resolveAndEmit awaits peerLookup. If the notifier is disposed
during the await, _eventController.close() has already run; the
subsequent _eventController.add would throw 'Bad state: Cannot
add event after closing'. Added an isClosed check after the
await before the identity check.
2. smc_stat_total_today msgstr read 'Total today' but the
ShareState.totalCount is session-scoped (reset on every
toggle-on, no day bucket, no persistence). Renamed to 'Total
this session' so the label matches the implemented semantics.
#8820's rebase later replaces this key with smc_stat_total_helped
+ 'Total people helped to date' alongside persistence via
unboundedTotalHelped — until then the more honest 'session'
wording matches reality.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 7d03f48 commit 95c1b5a
2 files changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
615 | | - | |
| 615 | + | |
616 | 616 | | |
617 | 617 | | |
618 | 618 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
489 | 494 | | |
490 | 495 | | |
491 | 496 | | |
| |||
0 commit comments