Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/Elmish.WPF/ViewModelArgs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,11 @@ module internal LoggingViewModelArgs =
nameChain = "" }


type internal ViewModelArgs<'model, 'msg> =
{ initialModel: 'model
dispatch: 'msg -> unit
loggingArgs: LoggingViewModelArgs }
type ViewModelArgs<'model, 'msg> =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep this internal for now. Make in public in the PR that needs that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This essentially undoes this PR. I'll just close it until we implement static view models, which will need it.

internal { initialModel: 'model; dispatch: 'msg -> unit; loggingArgs: LoggingViewModelArgs }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep each field on it's own line. In particular, this will keep the diff smaller.


module internal ViewModelArgs =
let create initialModel dispatch nameChain loggingArgs =
module ViewModelArgs =
let internal create initialModel dispatch nameChain loggingArgs =
{ initialModel = initialModel
dispatch = dispatch
loggingArgs = LoggingViewModelArgs.map nameChain loggingArgs }
Expand All @@ -42,8 +40,10 @@ module internal ViewModelArgs =
{ initialModel = v.initialModel |> mapModel
dispatch = mapMsg >> v.dispatch
loggingArgs = v.loggingArgs }
let simple initialModel =

let createWithoutLogging initialModel dispatch =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep this internal for now. Make in public in the PR that needs that.

{ initialModel = initialModel
dispatch = ignore
dispatch = dispatch
loggingArgs = LoggingViewModelArgs.none }

let simple initialModel = createWithoutLogging initialModel ignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep this internal for now. Make in public in the PR that needs that.