From 1e328784a3ea35fe11ca23c106df942de9667066 Mon Sep 17 00:00:00 2001 From: Michael Flisar Date: Mon, 27 Jan 2025 08:50:48 +0100 Subject: [PATCH] Bugfix: DialogList with async loader and no saver did not load items correctly --- .../michaelflisar/composedialogs/dialogs/list/DialogList.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/library/modules/list/src/commonMain/kotlin/com/michaelflisar/composedialogs/dialogs/list/DialogList.kt b/library/modules/list/src/commonMain/kotlin/com/michaelflisar/composedialogs/dialogs/list/DialogList.kt index ba8d60d..857e1e7 100644 --- a/library/modules/list/src/commonMain/kotlin/com/michaelflisar/composedialogs/dialogs/list/DialogList.kt +++ b/library/modules/list/src/commonMain/kotlin/com/michaelflisar/composedialogs/dialogs/list/DialogList.kt @@ -202,10 +202,7 @@ private fun DialogList( mutableStateOf("") } - val filteredItemsLoaded = - if (itemsProvider is DialogList.ItemProvider.Loader && itemsProvider.itemSaver != null) { - rememberSaveable { mutableStateOf(false) } - } else remember { mutableStateOf(true) } + val filteredItemsLoaded = rememberSaveable { mutableStateOf(itemsProvider is DialogList.ItemProvider.List) } val filteredItems = remember(items.value, filterText, filter) { derivedStateOf {