fix: always show bottom bar, resolve chat input double padding, and format codebase

This commit is contained in:
Hy4ri committed 2026-06-19 18:14:41 +03:00
1 parent 91ad09b5f2
commit 9e3a7ab339
24 files changed
+143 -45

No files matched your search

@@ -201,8 +201,7 @@ private fun AssistantBubble(
bottomStart = 16.dp,
bottomEnd = 16.dp,
),
)
.pointerInput(message.content) {
).pointerInput(message.content) {
detectTapGestures(
onLongPress = {
clipboardManager.setText(AnnotatedString(message.content))
@@ -459,8 +458,10 @@ private fun RichText(
text = annotated,
style = MaterialTheme.typography.bodyMedium.copy(color = textColor),
onClick = { offset: Int ->
annotated.getStringAnnotations("URL", offset, offset)
.firstOrNull()?.let { uriHandler.openUri(it.item) }
annotated
.getStringAnnotations("URL", offset, offset)
.firstOrNull()
?.let { uriHandler.openUri(it.item) }
},
)
}
@@ -116,10 +116,12 @@ fun ChatScreen(
NotificationHelper.setAppForeground(context, true)
NotificationHelper.stop(context)
}
androidx.lifecycle.Lifecycle.Event.ON_STOP -> {
NotificationHelper.setAppForeground(context, false)
NotificationHelper.start(context)
}
else -> {}
}
}
@@ -320,12 +322,11 @@ fun ChatScreen(
)
}
},
) { paddingValues ->
) { _ ->
Column(
modifier =
Modifier
.fillMaxSize()
.padding(paddingValues)
.background(backgroundGradient)
.imePadding(),
) {
@@ -51,7 +51,9 @@ data class ClarifyUi(
val options: List<String>,
)
class ChatViewModel(application: Application) : AndroidViewModel(application) {
class ChatViewModel(
application: Application,
) : AndroidViewModel(application) {
private val _uiState = MutableStateFlow(ChatUiState())
val uiState: StateFlow<ChatUiState> = _uiState.asStateFlow()