diff --git a/src/Main.elm b/src/Main.elm
@@ -33,7 +33,7 @@ update msg model =
({ model | status = val }, Cmd.none)
ToggleDarkMode ->
- ({ model | mode = toggle model.mode }, Cmd.none)
+ ({ model | darkModeOn = not model.darkModeOn }, Cmd.none)
Download ->
(model, Download.string model.fileName "image/svg+xml" model.image)
@@ -71,7 +71,7 @@ init =
in
{ image = emptySvg
, status = Valid
- , mode = Light
+ , darkModeOn = False
, uriEncoder = Maybe.withDefault Regex.never (Regex.fromString re)
, fileName = "example.svg"
, editorScroll = (0, 0)
@@ -85,15 +85,6 @@ loadContent =
, expect = Http.expectString Load
}
-toggle : Mode -> Mode
-toggle mode =
- case mode of
- Light ->
- Dark
-
- Dark ->
- Light
-
emptySvg : String
emptySvg = "<svg> . . . </svg>"