Skip to content

Commit

Permalink
skip header
Browse files Browse the repository at this point in the history
  • Loading branch information
kostmo committed Jan 25, 2023
1 parent bbad150 commit 73690cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/Swarm/Game/Scenario/Objective/Presentation/Model.hs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ data GoalEntry
= Header GoalStatus
| Goal GoalStatus Objective

isHeader :: GoalEntry -> Bool
isHeader = \case
Header _ -> True
_ -> False

data GoalTracking = GoalTracking
{ announcements :: [Announcement]
-- ^ TODO: #1044 the actual contents of these are not used yet,
Expand Down
2 changes: 1 addition & 1 deletion src/Swarm/TUI/Controller.hs
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ handleModalEvent = \case
Just _ -> handleInfoPanelEvent modalScroll (VtyEvent ev)
_ -> return ()
where
refreshList lw = nestEventM' lw $ BL.handleListEvent ev
refreshList lw = nestEventM' lw $ handleListEventWithSeparators ev isHeader

-- | Write the @ScenarioInfo@ out to disk when exiting a game.
saveScenarioInfoOnQuit :: (MonadIO m, MonadState AppState m) => m ()
Expand Down

0 comments on commit 73690cd

Please sign in to comment.