Commit 14aa37d
committed
feat: add ChatAction sealed interface with CompositionLocal
Threading action lambdas through MessageList -> ContentBubble -> CashBubble
(and deeper as more bubble types gain interactions) is verbose. A
CompositionLocal matches the project established pattern (LocalVibrator,
LocalExchange, LocalCodeNavigator, etc.) and avoids lambda-threading
entirely.
Introduce ChatAction, ChatActionHandler, and LocalChatActionHandler in
the shared chat-ui module. MessageList accepts onAction and provides it
via CompositionLocalProvider so nested composables consume it from the
local. Cash bubbles are now clickable, dispatching ViewToken to navigate
to the token info screen.
Signed-off-by: Brandon McAnsh <git@bmcreations.dev>1 parent 832f09e commit 14aa37d
5 files changed
Lines changed: 268 additions & 225 deletions
File tree
- apps/flipcash
- features/messenger/src/main/kotlin/com/flipcash/app/messenger/internal
- screens
- components
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
Lines changed: 24 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
110 | 126 | | |
111 | 127 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | 128 | | |
116 | 129 | | |
117 | 130 | | |
| |||
0 commit comments