Skip to content
Snippets Groups Projects
Commit 7d78fce0 authored by Jens Nolte's avatar Jens Nolte
Browse files

Remove (now unnecessary) updateBar'

parent 43f94885
No related branches found
No related tags found
No related merge requests found
...@@ -317,7 +317,7 @@ startPersistentBlockScript path = do ...@@ -317,7 +317,7 @@ startPersistentBlockScript path = do
fromHandle bar handle = forever $ do fromHandle bar handle = forever $ do
line <- lift $ TIO.hGetLine handle line <- lift $ TIO.hGetLine handle
yield $ pangoMarkup $ createBlock line yield $ pangoMarkup $ createBlock line
lift $ updateBar'' bar lift $ updateBar' bar
pangoColor :: RGB Double -> T.Text pangoColor :: RGB Double -> T.Text
pangoColor (RGB r g b) = pangoColor (RGB r g b) =
...@@ -342,11 +342,8 @@ addBlock block = do ...@@ -342,11 +342,8 @@ addBlock block = do
updateBar :: BarIO () updateBar :: BarIO ()
updateBar = liftIO =<< asks requestBarUpdate updateBar = liftIO =<< asks requestBarUpdate
updateBar' :: BarUpdateChannel -> IO () updateBar' :: Bar -> IO ()
updateBar' (BarUpdateChannel updateAction) = updateAction updateBar' = runReaderT updateBar
updateBar'' :: Bar -> IO ()
updateBar'' = updateBar' . BarUpdateChannel . requestBarUpdate
barAsync :: BarIO a -> BarIO (Async a) barAsync :: BarIO a -> BarIO (Async a)
barAsync action = do barAsync action = do
......
...@@ -155,7 +155,7 @@ installSignalHandlers = do ...@@ -155,7 +155,7 @@ installSignalHandlers = do
sigContAction :: Bar -> IO () sigContAction :: Bar -> IO ()
sigContAction bar = do sigContAction bar = do
hPutStrLn stderr "SIGCONT received" hPutStrLn stderr "SIGCONT received"
updateBar'' bar updateBar' bar
runBarConfiguration :: BarIO () -> MainOptions -> IO () runBarConfiguration :: BarIO () -> MainOptions -> IO ()
runBarConfiguration generateBarConfig options = do runBarConfiguration generateBarConfig options = do
...@@ -210,7 +210,7 @@ runBarConfiguration generateBarConfig options = do ...@@ -210,7 +210,7 @@ runBarConfiguration generateBarConfig options = do
case command of case command of
SetFilter blockFilter -> atomicWriteIORef activeFilter blockFilter SetFilter blockFilter -> atomicWriteIORef activeFilter blockFilter
Block -> error "TODO" Block -> error "TODO"
updateBar'' bar updateBar' bar
link socketUpdateAsync link socketUpdateAsync
runReaderT (renderLoop options handle barUpdateEvent initialOutput newBlockChan) bar runReaderT (renderLoop options handle barUpdateEvent initialOutput newBlockChan) bar
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment