Skip to content

Commit

Permalink
Fix demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Usbergo committed Feb 1, 2021
1 parent 6e7c14c commit a33b6ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"repositoryURL": "https://github.com/alexdrone/Store",
"state": {
"branch": "master",
"revision": "812b678debffdf9acb5838798708b186589d274e",
"revision": "6e7c14c6433d8a3f056606728700114cd90d6ea5",
"version": null
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class AppStateStore: CodableStore<AppState> {

/// Select (or deselect) a story.
func selectStory(_ item: Item?) {
run(action: TemplateAction.Assign( \AppState.selectedItem, item))
binding.selectedItem = item
}

func childStore(id: Item) -> Store<Item> {
Expand All @@ -67,7 +67,9 @@ class AppStateStore: CodableStore<AppState> {
}
let model = modelStorage.items.value![idx]
let modelStorage = UnownedChildModelStorage(parent: self.modelStorage, model: model) { _, _ in }
return Store(modelStorage: modelStorage)
let store = Store(modelStorage: modelStorage)
store.parent = self
return store
}
}

Expand Down

0 comments on commit a33b6ff

Please sign in to comment.