Duplicated bubbles came from the cubit emitting every inbox event to the screen regardless of whether it was already shown. On opening a chat the saved message loads from history AND the live subscription hands back the same stored gift wrap the relay re-delivers — two bubbles. (The store was already idempotent, but the cubit ignored that for display.) MessagesCubit now keeps a seen-set (sender+timestamp+text): a re-delivered or already-loaded message is skipped, and pre-existing duplicates in old saved history collapse on load too. Arrival order preserved (no resort). Tests: re-delivered wrap shown once; history-raced-by-live shown once. |
||
|---|---|---|
| .. | ||
| data | ||
| db | ||
| domain | ||
| i18n | ||
| security | ||
| services | ||
| state | ||
| support | ||
| tool | ||
| ui | ||
| flutter_test_config.dart | ||