Skip to content

Commit

Permalink
missing decoder for AddWindowSizeRequest +
Browse files Browse the repository at this point in the history
  • Loading branch information
lue-bird committed Dec 3, 2023
1 parent 5ee5a18 commit 952de9c
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/Web.elm
Original file line number Diff line number Diff line change
Expand Up @@ -1074,10 +1074,10 @@ interfaceDiffToJson =
\interfaceDiff ->
case interfaceDiff of
InterfaceWithReceiveDiff addOrReplaceDiff ->
addOrReplaceDiff |> interfaceAddOrReplaceDiffToJson
addOrReplaceDiff |> interfaceWithReceiveDiffToJson

InterfaceWithoutReceiveDiff removeDiff ->
removeDiff |> interfaceRemoveDiffToJson
removeDiff |> interfaceWithoutReceiveDiffToJson


domNodeIdToJson : DomNodeId -> Json.Encode.Value
Expand Down Expand Up @@ -1169,8 +1169,8 @@ httpBodyToJson =
Json.Encode.null


interfaceAddOrReplaceDiffToJson : InterfaceWithReceiveDiff -> Json.Encode.Value
interfaceAddOrReplaceDiffToJson =
interfaceWithReceiveDiffToJson : InterfaceWithReceiveDiff -> Json.Encode.Value
interfaceWithReceiveDiffToJson =
\interfaceAddOrReplaceDiff ->
Json.Encode.object
[ case interfaceAddOrReplaceDiff of
Expand Down Expand Up @@ -1219,8 +1219,8 @@ interfaceAddOrReplaceDiffToJson =
]


interfaceRemoveDiffToJson : InterfaceWithoutReceiveDiff -> Json.Encode.Value
interfaceRemoveDiffToJson =
interfaceWithoutReceiveDiffToJson : InterfaceWithoutReceiveDiff -> Json.Encode.Value
interfaceWithoutReceiveDiffToJson =
\interfaceRemoveDiff ->
Json.Encode.object
[ case interfaceRemoveDiff of
Expand Down Expand Up @@ -1322,7 +1322,7 @@ programSubscriptions appConfig =
-- re-associate event based on current interface
appConfig.ports.fromJs
(\interfaceJson ->
case interfaceJson |> Json.Decode.decodeValue (Json.Decode.field "diff" interfaceDiffJsonDecoder) of
case interfaceJson |> Json.Decode.decodeValue (Json.Decode.field "diff" interfaceDiffWithReceiveJsonDecoder) of
Ok interfaceDiff ->
case
state.interface
Expand Down Expand Up @@ -1359,8 +1359,8 @@ domNodeIdJsonDecoder =
]


interfaceDiffJsonDecoder : Json.Decode.Decoder InterfaceWithReceiveDiff
interfaceDiffJsonDecoder =
interfaceDiffWithReceiveJsonDecoder : Json.Decode.Decoder InterfaceWithReceiveDiff
interfaceDiffWithReceiveJsonDecoder =
Json.Decode.oneOf
[ Json.Decode.map (\() -> AddTimePosixRequest)
(Json.Decode.field "addTimePosixRequest" (Json.Decode.null ()))
Expand All @@ -1385,6 +1385,8 @@ interfaceDiffJsonDecoder =
)
, Json.Decode.map AddHttpRequest
(Json.Decode.field "addHttpRequest" httpRequestIdJsonDecoder)
, Json.Decode.map (\() -> AddWindowSizeRequest)
(Json.Decode.field "addWindowSizeRequest" (Json.Decode.null ()))
, Json.Decode.map AddWindowEventListen
(Json.Decode.field "addWindowEventListen" Json.Decode.string)
, Json.Decode.map (\() -> AddWindowAnimationFrameListen)
Expand Down

0 comments on commit 952de9c

Please sign in to comment.