mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-04-05 10:59:33 +00:00
Merge pull request #878 from eikek/fix/877-language-per-source
Update language dropdown for new data
This commit is contained in:
commit
5f04ee3703
@ -155,6 +155,7 @@ update flags msg model =
|
|||||||
, enabled = t.source.enabled
|
, enabled = t.source.enabled
|
||||||
, folder = t.source.folder
|
, folder = t.source.folder
|
||||||
, fileFilter = t.source.fileFilter
|
, fileFilter = t.source.fileFilter
|
||||||
|
, language = t.source.language
|
||||||
}
|
}
|
||||||
|
|
||||||
newModel =
|
newModel =
|
||||||
@ -168,6 +169,7 @@ update flags msg model =
|
|||||||
, enabled = t.source.enabled
|
, enabled = t.source.enabled
|
||||||
, folderId = t.source.folder
|
, folderId = t.source.folder
|
||||||
, fileFilter = t.source.fileFilter
|
, fileFilter = t.source.fileFilter
|
||||||
|
, language = t.source.language
|
||||||
}
|
}
|
||||||
|
|
||||||
mkIdName id =
|
mkIdName id =
|
||||||
@ -189,12 +191,21 @@ update flags msg model =
|
|||||||
Nothing ->
|
Nothing ->
|
||||||
[]
|
[]
|
||||||
|
|
||||||
|
langSel =
|
||||||
|
case Maybe.andThen Data.Language.fromString t.source.language of
|
||||||
|
Just lang ->
|
||||||
|
[ lang ]
|
||||||
|
|
||||||
|
Nothing ->
|
||||||
|
[]
|
||||||
|
|
||||||
tags =
|
tags =
|
||||||
Comp.Dropdown.SetSelection t.tags.items
|
Comp.Dropdown.SetSelection t.tags.items
|
||||||
in
|
in
|
||||||
Util.Update.andThen1
|
Util.Update.andThen1
|
||||||
[ update flags (FolderDropdownMsg (Comp.Dropdown.SetSelection sel))
|
[ update flags (FolderDropdownMsg (Comp.Dropdown.SetSelection sel))
|
||||||
, update flags (TagDropdownMsg tags)
|
, update flags (TagDropdownMsg tags)
|
||||||
|
, update flags (LanguageMsg (Comp.Dropdown.SetSelection langSel))
|
||||||
]
|
]
|
||||||
newModel
|
newModel
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user