Skip to content

Commit e1b2b3c

Browse files
Fix: Update PhotoReasoningScreen previews with notification dialog params
The `PhotoReasoningScreen` composable was updated to accept `showNotificationRationaleDialog` and `onShowNotificationRationaleDialogChange` parameters due to state hoisting. The `@Preview` functions (`PhotoReasoningScreenPreviewWithContent` and `PhotoReasoningScreenPreviewEmpty`) were not updated accordingly, leading to "No value passed for parameter" compilation errors. This commit updates both preview functions to pass default values (`showNotificationRationaleDialog = false`, `onShowNotificationRationaleDialogChange = {}`) for these new parameters, resolving the build errors.
1 parent 1f439e1 commit e1b2b3c

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

app/src/main/kotlin/com/google/ai/sample/feature/multimodal/PhotoReasoningScreen.kt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,9 @@ fun PhotoReasoningScreenPreviewWithContent() {
10621062
PhotoReasoningMessage(text = "I am here to help you. What do you want to know?", participant = PhotoParticipant.MODEL)
10631063
),
10641064
isKeyboardOpen = false,
1065-
onStopClicked = {}
1065+
onStopClicked = {},
1066+
showNotificationRationaleDialog = false,
1067+
onShowNotificationRationaleDialogChange = {}
10661068
)
10671069
}
10681070
}
@@ -1160,7 +1162,14 @@ val SystemMessageEntrySaver = Saver<SystemMessageEntry?, List<String?>>(
11601162
@Composable
11611163
@Preview(showSystemUi = true)
11621164
fun PhotoReasoningScreenPreviewEmpty() {
1163-
MaterialTheme { PhotoReasoningScreen(isKeyboardOpen = false, onStopClicked = {}) }
1165+
MaterialTheme {
1166+
PhotoReasoningScreen(
1167+
isKeyboardOpen = false,
1168+
onStopClicked = {},
1169+
showNotificationRationaleDialog = false,
1170+
onShowNotificationRationaleDialogChange = {}
1171+
)
1172+
}
11641173
}
11651174

11661175
@Preview(showBackground = true)

0 commit comments

Comments
 (0)