From 81910797a79cb142aea7e716fdf5759f8be37ceb Mon Sep 17 00:00:00 2001 From: Bnyro Date: Wed, 12 Jun 2024 23:14:46 +0200 Subject: [PATCH] fix: can't delete consecutive history entries (closes #437) --- .../main/java/com/bnyro/translate/ui/screens/HistoryScreen.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/bnyro/translate/ui/screens/HistoryScreen.kt b/app/src/main/java/com/bnyro/translate/ui/screens/HistoryScreen.kt index 35ac41d6e..bd1f1b46c 100644 --- a/app/src/main/java/com/bnyro/translate/ui/screens/HistoryScreen.kt +++ b/app/src/main/java/com/bnyro/translate/ui/screens/HistoryScreen.kt @@ -137,7 +137,7 @@ fun HistoryScreen( LazyColumn( modifier = Modifier.fillMaxSize() ) { - items(filteredItems) { + items(filteredItems, key = { item -> item.id }) { HistoryRow(navController, translationModel, it) { viewModel.deleteItem(it) }