relese/2.3.3 #56
@@ -53,7 +53,6 @@ import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import me.zobrist.tichucounter.R
|
||||
import me.zobrist.tichucounter.data.GameWithScores
|
||||
@@ -160,31 +159,23 @@ fun HistoryList(
|
||||
onDeleteAllClicked: () -> Unit,
|
||||
lazyListState: LazyListState = LazyListState(),
|
||||
) {
|
||||
val scope = rememberCoroutineScope()
|
||||
|
||||
Row {
|
||||
LazyColumn(state = lazyListState) {
|
||||
items(
|
||||
items = games,
|
||||
key = { it.game.uid }) { item ->
|
||||
if (item.game.active) {
|
||||
key = { it.hashCode() }) {
|
||||
if (it.game.active) {
|
||||
HistoryListItem(
|
||||
item,
|
||||
it,
|
||||
Modifier
|
||||
.animateItemPlacement()
|
||||
.padding(2.dp)
|
||||
)
|
||||
} else {
|
||||
DismissibleHistoryListItem(
|
||||
item,
|
||||
it,
|
||||
Modifier.animateItemPlacement(),
|
||||
{
|
||||
onOpenClicked(it)
|
||||
scope.launch {
|
||||
delay(100)
|
||||
lazyListState.animateScrollToItem(0)
|
||||
}
|
||||
},
|
||||
onOpenClicked,
|
||||
onDeleteClicked
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user