Skip to content

Commit

Permalink
deps: update to brick-2.1
Browse files Browse the repository at this point in the history
brick-2.1 brings a new entrypoint that lets us avoid building the
vty ourselves.  Update to v2.1.
  • Loading branch information
frasertweedale committed Nov 4, 2023
1 parent 43f5ed3 commit e6d2474
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions purebred.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ library
, deepseq >= 1.4.2
, dyre >= 0.9.1
, lens
, brick >= 1.5 && < 1.11
, brick >= 2.1 && < 2.2
, text-zipper
, vty >= 5.34
, vty >= 6
, vector >= 0.12.0.0
, notmuch >= 0.3.1 && < 0.4
, text
Expand Down
7 changes: 2 additions & 5 deletions src/Purebred.hs
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,10 @@ import Purebred.Storage.Tags (TagOp(..))
import Purebred.Types.Error

-- re-exports for configuration
import qualified Graphics.Vty
import Graphics.Vty.Attributes
import Graphics.Vty.Input.Events (Event(..), Key(..), Modifier(..))
import Brick.BChan (newBChan)
import Brick.Main (customMain)
import Brick.Main (customMainWithDefaultVty)
import Brick.Util (on, fg, bg)
import Brick.AttrMap (AttrName, applyAttrMappings, attrName)
import Control.Lens ((&), _head, ifoldMap, ix, over, preview, set, toListOf, view, views)
Expand Down Expand Up @@ -304,14 +303,12 @@ launch ghcOpts inCfg = do
sink (LT.pack "Opened log file")

s <- initialState cfg' bchan server sink
let buildVty = Graphics.Vty.mkVty Graphics.Vty.defaultConfig
initialVty <- buildVty

let query = view (confNotmuch . nmHasNewMailSearch) cfg'
delay = view (confNotmuch . nmHasNewMailCheckDelay) cfg'
maybe (pure ()) (rescheduleMailcheck bchan server query) delay

void $ customMain initialVty buildVty (Just bchan) (theApp s) s
void $ customMainWithDefaultVty (Just bchan) (theApp s) s


-- | Main program entry point. Apply to a list of plugins (use
Expand Down

0 comments on commit e6d2474

Please sign in to comment.