Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Commit

Permalink
adapts to core (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiagoperes authored Jan 12, 2023
1 parent f339cdf commit 91a471e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ plugins{

buildscript {
val compose_version by extra("1.3.0")
val nimbus_core_version by extra("1.0.0-alpha13")
val nimbus_core_version by extra("1.0.0-alpha14")
repositories {
gradlePluginPortal()
google()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,13 @@ internal class NimbusViewModel(
serverDrivenNavigator: ServerDrivenNavigator,
initialRequest: Boolean = false) =
viewModelScope.launch(CoroutineDispatcherLib.inputOutputPool) {
val stateInstances = request.params?.map { ServerDrivenState(it.key, it.value) }
val viewStates = request.state?.map { ServerDrivenState(it.key, it.value) }
val view = ServerDrivenView(
nimbus = nimbusConfig,
getNavigator = { serverDrivenNavigator },
description = request.url,
states = stateInstances,
states = viewStates,
events = request.events,
)
val url = request.url
val page = Page(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class NimbusViewModelTest : BaseTest() {
val pageUrl = RandomData.httpUrl()
val viewRequest = ViewRequest(
url = pageUrl,
params = mapOf("testParamState" to "test state param value")
state = mapOf("testParamState" to "test state param value")
)

//When
Expand Down

0 comments on commit 91a471e

Please sign in to comment.