Skip to content

Commit

Permalink
Merge pull request #493 from arkivanov/pages-configuration-keys-jb
Browse files Browse the repository at this point in the history
Avoid using configurations as keys in Pages (Multiplatform Compose)
  • Loading branch information
arkivanov authored Sep 30, 2023
2 parents f8e8d1b + 9136a25 commit a4f9b5c
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 a4f9b5c

Please sign in to comment.