Skip to content

Commit

Permalink
[IDLE-471] 전체 채팅 보기를 갔다온 이후 이전 스크롤으로 돌아가도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
tgyuuAn committed Nov 4, 2024
1 parent 3d94500 commit 3544431
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Card
Expand Down Expand Up @@ -96,6 +97,8 @@ internal fun ApplicantInquiryScreen(
},
containerColor = CareTheme.colors.white000,
) { paddingValues ->
val listState = rememberLazyListState()

Column(
modifier = Modifier
.padding(paddingValues)
Expand All @@ -110,6 +113,7 @@ internal fun ApplicantInquiryScreen(
)

LazyColumn(
state = listState,
horizontalAlignment = Alignment.Start,
verticalArrangement = Arrangement.spacedBy(space = 8.dp),
modifier = Modifier.padding(horizontal = 20.dp),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import androidx.compose.foundation.layout.widthIn
import androidx.compose.foundation.layout.wrapContentWidth
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Scaffold
Expand Down Expand Up @@ -77,6 +78,8 @@ internal fun CenterChattingScreen(
chatRoomList: List<ChatRoom>?,
navigateTo: (DeepLinkDestination) -> Unit,
) {
val listState = rememberLazyListState()

Scaffold(
topBar = {
CareHeadingTopBar(
Expand Down Expand Up @@ -119,6 +122,7 @@ internal fun CenterChattingScreen(
}
} else {
LazyColumn(
state = listState,
modifier = Modifier
.fillMaxSize()
.padding(top = 20.dp),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.itemsIndexed
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
Expand Down Expand Up @@ -104,6 +105,7 @@ internal fun ChattingDetailScreen(
navigateUp: () -> Unit,
) {
val focusManager = LocalFocusManager.current
val listState = rememberLazyListState()
var lastDate: String? = null

Scaffold(
Expand All @@ -125,6 +127,7 @@ internal fun ChattingDetailScreen(
.padding(paddingValue),
) {
LazyColumn(
state = listState,
modifier = Modifier
.fillMaxWidth()
.weight(1f)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import androidx.compose.foundation.layout.widthIn
import androidx.compose.foundation.layout.wrapContentWidth
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Scaffold
Expand Down Expand Up @@ -81,6 +82,8 @@ internal fun WorkerChattingScreen(
chatRoomList: List<ChatRoom>?,
navigateTo: (DeepLinkDestination) -> Unit,
) {
val listState = rememberLazyListState()

Scaffold(
topBar = {
CareHeadingTopBar(
Expand Down Expand Up @@ -123,6 +126,7 @@ internal fun WorkerChattingScreen(
}
} else {
LazyColumn(
state = listState,
modifier = Modifier
.fillMaxSize()
.padding(top = 20.dp),
Expand Down

0 comments on commit 3544431

Please sign in to comment.