Made viewMode pattern matches exhaustive

This commit is contained in:
Stefan Scheidewig 2021-04-18 22:31:17 +02:00
parent dd743cf273
commit 5faf0e5a0e
2 changed files with 8 additions and 8 deletions

View File

@ -115,7 +115,7 @@ attachHeader texts settings model _ attach =
SelectView _ ->
True
_ ->
SimpleView ->
False
selectToggleText =
@ -123,7 +123,7 @@ attachHeader texts settings model _ attach =
SelectView _ ->
texts.exitSelectMode
_ ->
SimpleView ->
texts.selectModeTitle
noAttachmentsSelected =
@ -364,7 +364,7 @@ menuItem texts model pos attach =
else
"fa fa-circle ml-1"
_ ->
SimpleView ->
"fa fa-check-circle ml-1"
visible =
@ -372,7 +372,7 @@ menuItem texts model pos attach =
SelectView _ ->
True
_ ->
SimpleView ->
model.visibleAttach == pos
msg =
@ -380,7 +380,7 @@ menuItem texts model pos attach =
SelectView _ ->
ToggleAttachment attach.id
_ ->
SimpleView ->
SetActiveAttachment pos
in
a

View File

@ -281,7 +281,7 @@ update key flags inav settings msg model =
resultModel
{ model | viewMode = SelectView svm_ }
_ ->
SimpleView ->
resultModel model
ToggleMenu ->
@ -968,7 +968,7 @@ update key flags inav settings msg model =
in
resultModel model_
_ ->
SimpleView ->
resultModel model
DeleteSelectedConfirmed ->
@ -980,7 +980,7 @@ update key flags inav settings msg model =
in
resultModelCmd ( { model | attachModal = Nothing, viewMode = SimpleView }, cmd )
_ ->
SimpleView ->
resultModel model
AddFilesToggle ->