mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-06 07:05:59 +00:00
Better handle no connections
This commit is contained in:
parent
2042824ab4
commit
e7b81c701f
@ -79,7 +79,7 @@ object NotifyDueItemsRoutes {
|
|||||||
} yield NotificationSettings(
|
} yield NotificationSettings(
|
||||||
task.id,
|
task.id,
|
||||||
task.enabled,
|
task.enabled,
|
||||||
conn.getOrElse(Ident.unsafe("none")),
|
conn.getOrElse(Ident.unsafe("")),
|
||||||
task.args.recipients,
|
task.args.recipients,
|
||||||
task.timer,
|
task.timer,
|
||||||
task.args.remindDays,
|
task.args.remindDays,
|
||||||
|
@ -24,6 +24,7 @@ import Html.Attributes exposing (..)
|
|||||||
import Html.Events exposing (onCheck, onClick)
|
import Html.Events exposing (onCheck, onClick)
|
||||||
import Http
|
import Http
|
||||||
import Util.Http
|
import Util.Http
|
||||||
|
import Util.Maybe
|
||||||
import Util.Tag
|
import Util.Tag
|
||||||
import Util.Update
|
import Util.Update
|
||||||
|
|
||||||
@ -271,9 +272,14 @@ update flags msg model =
|
|||||||
|
|
||||||
SetNotificationSettings (Ok s) ->
|
SetNotificationSettings (Ok s) ->
|
||||||
let
|
let
|
||||||
|
smtp =
|
||||||
|
Util.Maybe.fromString s.smtpConnection
|
||||||
|
|> Maybe.map List.singleton
|
||||||
|
|> Maybe.withDefault []
|
||||||
|
|
||||||
( nm, nc ) =
|
( nm, nc ) =
|
||||||
Util.Update.andThen1
|
Util.Update.andThen1
|
||||||
[ update flags (ConnMsg (Comp.Dropdown.SetSelection [ s.smtpConnection ]))
|
[ update flags (ConnMsg (Comp.Dropdown.SetSelection smtp))
|
||||||
, update flags (TagIncMsg (Comp.Dropdown.SetSelection s.tagsInclude))
|
, update flags (TagIncMsg (Comp.Dropdown.SetSelection s.tagsInclude))
|
||||||
, update flags (TagExcMsg (Comp.Dropdown.SetSelection s.tagsExclude))
|
, update flags (TagExcMsg (Comp.Dropdown.SetSelection s.tagsExclude))
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user