Commit ee7d7f9
committed
Fix: Resolve type mismatch in PhotoReasoningViewModel.reason() for imageUris.
Corrected a build error caused by a type mismatch when creating a
PhotoReasoningMessage within the `reason` method. The `imageUrisForChat`
parameter (List<String>?) was being assigned to the `imageUris` field,
which expected a non-nullable List<String>.
The fix uses the Elvis operator to provide `emptyList()` if
`imageUrisForChat` is null:
`imageUris = imageUrisForChat ?: emptyList()`
This ensures a non-nullable list is always passed, resolving the
compilation error and maintaining the intended logic for displaying
images in chat messages.1 parent 4c643eb commit ee7d7f9
1 file changed
Lines changed: 1 addition & 1 deletion
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
0 commit comments