Skip to content

Commit

Permalink
Avoid using configurations as keys in Pages (Multiplatform Compose)
Browse files Browse the repository at this point in the history
  • Loading branch information
arkivanov committed Sep 30, 2023
1 parent f8e8d1b commit 9136a25
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import com.arkivanov.decompose.ExperimentalDecomposeApi
import com.arkivanov.decompose.extensions.compose.jetbrains.subscribeAsState
import com.arkivanov.decompose.hashString
import com.arkivanov.decompose.router.pages.ChildPages
import com.arkivanov.decompose.value.Value

Expand Down Expand Up @@ -82,7 +83,7 @@ fun <T : Any> Pages(
pager(
modifier,
state,
{ childPages.items[it].configuration },
{ childPages.items[it].configuration.hashString() },
) { pageIndex ->
childPages.items[pageIndex].instance?.also { page ->
pageContent(pageIndex, page)
Expand Down

0 comments on commit 9136a25

Please sign in to comment.