diff --git a/src/Main.elm b/src/Main.elm index 04ad316..a05373e 100644 --- a/src/Main.elm +++ b/src/Main.elm @@ -25,8 +25,8 @@ import File.Download as Download -- PC Stuff import PC.Types exposing (..) -import PC.PC as PC -import PC.Json +import PC.PC as PC +import PC.Json import PC.Helpers exposing (..) -- Note that general Stuff is at the end of the document @@ -287,7 +287,7 @@ cmd_up_lStorage_n_Scroller model = Cmd.batch [ cmd_up_lStorage model , cmd_scoller model - ] + ] -- ############################################################################### -- ############################################################################### @@ -329,15 +329,15 @@ doDecodeModel jText = _ -> Nothing in jText - |> JD.decodeString modelDecoder + |> JD.decodeString modelDecoder |> error2maybe modelDecoder : JD.Decoder Model -modelDecoder = +modelDecoder = let mainDecoder : String -> JD.Decoder Model mainDecoder version = - if (version == pcModelVersion) then + if (version == "4" || version == "3") then JD.map2 (\a b -> Model a b [] False Waiting Waiting initDragDrop False ) ( JD.field "pc_model" PC.Json.pcModelDecoder ) diff --git a/src/PC/Update.elm b/src/PC/Update.elm index 4a987f5..4ebed1f 100644 --- a/src/PC/Update.elm +++ b/src/PC/Update.elm @@ -11,9 +11,9 @@ import PC.Helpers exposing (..) pc_update : PC_Msg -> PC_Model -> (PC_Model, PC_AfterUpdateAction) pc_update msg model = case msg of - PM_B_UCycleStep -> + PM_B_UCycleStep -> let (new_model, reqAlert) = uStepPC model - in + in ( new_model , if reqAlert == True then PUA_Alert else if model.pc.uCounter == 0 then PUA_Storage_And_Scroller