From 4718d4ac1819ec8ef9eb70441b96fce1b6164005 Mon Sep 17 00:00:00 2001 From: Sad Ellie Date: Thu, 25 May 2023 22:03:32 +0300 Subject: [PATCH] Update History List on change --- .../unitto/feature/calculator/components/HistoryList.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/feature/calculator/src/main/java/com/sadellie/unitto/feature/calculator/components/HistoryList.kt b/feature/calculator/src/main/java/com/sadellie/unitto/feature/calculator/components/HistoryList.kt index 66cf68b7..dbc5597f 100644 --- a/feature/calculator/src/main/java/com/sadellie/unitto/feature/calculator/components/HistoryList.kt +++ b/feature/calculator/src/main/java/com/sadellie/unitto/feature/calculator/components/HistoryList.kt @@ -123,8 +123,8 @@ private fun HistoryListContent( formatterSymbols: FormatterSymbols, historyItemHeightCallback: (Int) -> Unit ) { - val firstItem by remember { mutableStateOf(historyItems.first()) } - val restOfTheItems by remember { mutableStateOf(historyItems.drop(1)) } + val firstItem by remember(historyItems) { mutableStateOf(historyItems.first()) } + val restOfTheItems by remember(firstItem) { mutableStateOf(historyItems.drop(1)) } LazyColumn( modifier = modifier,