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

Commit

Permalink
Update to new ObservableStore API
Browse files Browse the repository at this point in the history
  • Loading branch information
bfollington committed Mar 6, 2024
1 parent 0849cba commit 9359c71
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion xcode/Subconscious/Shared/Components/AppView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ struct AppView: View {
.sheet(
isPresented: Binding(
get: { store.state.isSettingsSheetPresented },
send: store.send,
transact: store.transact,
tag: AppAction.presentSettingsSheet
)
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ struct SearchView: View {
placeholder: store.state.placeholder,
text: Binding(
get: { store.state.query },
send: store.send,
transact: store.transact,
tag: SearchAction.setQuery
),
autofocus: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct DetailStackView<Root: View>: View {
NavigationStack(
path: Binding(
get: { store.state.details },
send: store.send,
transact: store.transact,
tag: DetailStackAction.setDetails
)
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ struct MemoEditorDetailView: View {
.sheet(
isPresented: Binding(
get: { store.state.isMetaSheetPresented },
send: store.send,
transact: store.transact,
tag: MemoEditorDetailAction.presentMetaSheet
)
) {
Expand All @@ -155,7 +155,7 @@ struct MemoEditorDetailView: View {
.sheet(
isPresented: Binding(
get: { store.state.isLinkSheetPresented },
send: store.send,
transact: store.transact,
tag: MemoEditorDetailAction.setLinkSheetPresented
)
) {
Expand All @@ -164,7 +164,7 @@ struct MemoEditorDetailView: View {
suggestions: store.state.linkSuggestions,
text: Binding(
get: { store.state.linkSearchText },
send: store.send,
transact: store.transact,
tag: MemoEditorDetailAction.setLinkSearch
),
onCancel: {
Expand Down Expand Up @@ -289,7 +289,7 @@ struct MemoEditorDetailView: View {
DetailKeyboardToolbarView(
isSheetPresented: Binding(
get: { store.state.isLinkSheetPresented },
send: store.send,
transact: store.transact,
tag: MemoEditorDetailAction.setLinkSheetPresented
),
selectedShortlink: store.state.selectedShortlink,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ struct MemoViewerDetailView: View {
.sheet(
isPresented: Binding(
get: { store.state.isMetaSheetPresented },
send: store.send,
transact: store.transact,
tag: MemoViewerDetailAction.presentMetaSheet
)
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ struct FirstRunView: View {
NavigationStack(
path: Binding(
get: { app.state.firstRunPath },
send: app.send,
transact: app.transact,
tag: AppAction.setFirstRunPath
)
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ struct NotebookNavigationView: View {
"Are you sure you want to delete this note?",
isPresented: Binding(
get: { store.state.isConfirmDeleteShowing },
send: store.send,
transact: store.transact,
tag: NotebookAction.setConfirmDeleteShowing
),
titleVisibility: .visible,
Expand Down

0 comments on commit 9359c71

Please sign in to comment.