feat(packs): route pack Discuss to the unified conversation
Replace the orphaned in-thread QuestionDiscussionThread (which wrote to question_threads and sent no notifications) with a 'Discuss this together' button that opens the conversation (q_<questionId>), same as the daily flow — so pack discussions are notified and appear in the Messages inbox. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
7a9ff31ae6
commit
6580299f05
|
|
@ -46,7 +46,6 @@ import app.closer.ui.components.ErrorState
|
|||
import app.closer.ui.components.LoadingState
|
||||
import app.closer.ui.questions.components.AnswerBubble
|
||||
import app.closer.ui.questions.components.QuestionAnswerInput
|
||||
import app.closer.ui.questions.components.QuestionDiscussionThread
|
||||
import app.closer.ui.questions.components.QuestionHeader
|
||||
import app.closer.ui.theme.closerBackgroundBrush
|
||||
|
||||
|
|
@ -235,17 +234,19 @@ private fun RevealedPhase(
|
|||
)
|
||||
}
|
||||
|
||||
QuestionDiscussionThread(
|
||||
messages = state.messages,
|
||||
currentUserId = viewModel.currentUserId,
|
||||
partnerPhotoUrl = state.partnerPhotoUrl,
|
||||
messageInput = state.messageInput,
|
||||
onMessageInputChanged = viewModel::updateMessageInput,
|
||||
onSendMessage = viewModel::sendMessage,
|
||||
isRevealed = true,
|
||||
onSendImage = viewModel::sendImage,
|
||||
loadDecryptedMedia = viewModel::loadDecryptedMedia
|
||||
)
|
||||
// Discussion now lives in the unified Messages conversation (q_<questionId>) so it's notified
|
||||
// and appears in the inbox — same as the daily flow.
|
||||
Button(
|
||||
onClick = { onNavigate(AppRoute.conversation(coupleId, "q_$questionId")) },
|
||||
modifier = Modifier.fillMaxWidth().heightIn(min = 48.dp),
|
||||
shape = RoundedCornerShape(16.dp),
|
||||
colors = ButtonDefaults.buttonColors(
|
||||
containerColor = MaterialTheme.colorScheme.secondaryContainer,
|
||||
contentColor = MaterialTheme.colorScheme.onSecondaryContainer
|
||||
)
|
||||
) {
|
||||
Text("Discuss this together")
|
||||
}
|
||||
|
||||
// Navigation out of the thread
|
||||
Row(
|
||||
|
|
|
|||
Loading…
Reference in New Issue