Skip to content

Commit

Permalink
Merge pull request #1023 from GGBBB2000/fix-loading-spinner-position
Browse files Browse the repository at this point in the history
Fix the position of the loading spinner in StaffScreen
  • Loading branch information
takahirom authored Sep 9, 2024
2 parents 4ede1a4 + 37b3b36 commit 2daf030
Showing 1 changed file with 23 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,22 +123,22 @@ fun StaffScreen(
}
},
) { padding ->
LazyColumn(
modifier = Modifier
.fillMaxSize()
.padding(top = padding.calculateTopPadding())
.let {
if (scrollBehavior != null) {
it.nestedScroll(scrollBehavior.nestedScrollConnection)
} else {
it
}
}
.testTag(StaffScreenLazyColumnTestTag),
contentPadding = PaddingValues(bottom = 40.dp + padding.calculateBottomPadding()),
) {
when (uiState) {
is StaffUiState.Exists -> {
when (uiState) {
is StaffUiState.Exists -> {
LazyColumn(
modifier = Modifier
.fillMaxSize()
.padding(top = padding.calculateTopPadding())
.let {
if (scrollBehavior != null) {
it.nestedScroll(scrollBehavior.nestedScrollConnection)
} else {
it
}
}
.testTag(StaffScreenLazyColumnTestTag),
contentPadding = PaddingValues(bottom = 40.dp + padding.calculateBottomPadding()),
) {
items(uiState.staff) { staff ->
StaffItem(
staff = staff,
Expand All @@ -149,15 +149,13 @@ fun StaffScreen(
)
}
}
is StaffUiState.Loading -> {
item {
Box(
contentAlignment = Alignment.Center,
modifier = Modifier.padding(padding).fillMaxSize(),
) {
CircularProgressIndicator()
}
}
}
is StaffUiState.Loading -> {
Box(
contentAlignment = Alignment.Center,
modifier = Modifier.padding(padding).fillMaxSize(),
) {
CircularProgressIndicator()
}
}
}
Expand Down

0 comments on commit 2daf030

Please sign in to comment.