Skip to content

Commit

Permalink
fixed padding for markdown text field in chat
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-wls committed Nov 26, 2024
1 parent a8098e9 commit 18a825c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ package de.tum.informatics.www1.artemis.native_app.feature.metis.conversation.ui
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.asPaddingValues
import androidx.compose.foundation.layout.calculateEndPadding
import androidx.compose.foundation.layout.calculateStartPadding
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.safeContent
import androidx.compose.foundation.layout.safeContentPadding
import androidx.compose.foundation.layout.systemBars
import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.foundation.lazy.rememberLazyListState
Expand Down Expand Up @@ -114,7 +118,7 @@ internal fun ConversationChatListScreen(
modifier = Modifier
.fillMaxSize()
.imePadding()
.padding(bottom = padding.calculateBottomPadding()),
.padding(bottom = WindowInsets.systemBars.asPaddingValues().calculateBottomPadding()),
viewModel = viewModel,
listContentPadding = PaddingValues(top = padding.calculateTopPadding()),
onClickViewPost = onClickViewPost,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ package de.tum.informatics.www1.artemis.native_app.feature.metis.conversation.ui

import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.asPaddingValues
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.systemBars
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material.icons.filled.Refresh
Expand Down Expand Up @@ -61,7 +64,7 @@ internal fun ConversationThreadScreen(
modifier = Modifier
.fillMaxSize()
.imePadding()
.padding(bottom = padding.calculateBottomPadding())
.padding(bottom = WindowInsets.systemBars.asPaddingValues().calculateBottomPadding()),
) {
CompositionLocalProvider(LocalReplyAutoCompleteHintProvider provides viewModel) {
MetisThreadUi(
Expand Down

0 comments on commit 18a825c

Please sign in to comment.