Commit da0224f
committed
Consume recording-transition flag only on announce
Move `onTransitionConsumed()` inside the announcement branches so the
caller's `cancelRequested` flag only clears when an announcement has
actually fired. The bug described in the review doesn't manifest with
the current state writers (the wrapped `onCancelRecording` /
`onDeleteRecording` set the flag and `setState(Idle)` in the same
Compose snapshot) but separating "transition observed" from "transition
consumed" tightens the helper's contract and makes it robust to future
changes to the flag writers or the `LaunchedEffect` keys.1 parent 4b6ddf9 commit da0224f
1 file changed
Lines changed: 7 additions & 3 deletions
File tree
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/composer/internal
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
| 88 | + | |
86 | 89 | | |
87 | 90 | | |
88 | 91 | | |
| 92 | + | |
89 | 93 | | |
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
95 | | - | |
| 99 | + | |
96 | 100 | | |
97 | 101 | | |
0 commit comments