Attachments selectable

This commit is contained in:
Stefan Scheidewig
2021-04-17 16:43:24 +02:00
parent a9c02e9e88
commit 1db5eaf5ee
3 changed files with 45 additions and 5 deletions

View File

@ -280,6 +280,18 @@ update key flags inav settings msg model =
, attachRename = Nothing
}
ToggleAttachment id ->
if Set.member id model.selectedAttachments then
resultModel
{ model
| selectedAttachments = Set.remove id model.selectedAttachments
}
else
resultModel
{ model
| selectedAttachments = Set.insert id model.selectedAttachments
}
ToggleMenu ->
resultModel
{ model | menuOpen = not model.menuOpen }
@ -1361,6 +1373,7 @@ update key flags inav settings msg model =
resultModel { model
| attachMenuOpen = not model.attachMenuOpen
, viewMode = SimpleView
, selectedAttachments = Set.empty
}
UiSettingsUpdated ->
@ -1585,6 +1598,7 @@ update key flags inav settings msg model =
withSub
( { model
| viewMode = nextView
, selectedAttachments = Set.empty
}
, cmd
)