pushed Assistant monad down into DaemonStatus code

Currently have three old versions of functions that more reworking is
needed to remove: getDaemonStatusOld, modifyDaemonStatusOld_, and
modifyDaemonStatusOld
This commit is contained in:
Joey Hess 2012-10-30 15:39:15 -04:00
parent ea8df8fe9f
commit 47d94eb9a4
20 changed files with 141 additions and 152 deletions

View file

@ -85,9 +85,7 @@ startupScan scanner = do
inRepo $ Git.Command.run "add" [Param "--update"]
showAction "started"
dstatus <- getAssistant daemonStatusHandle
liftIO $ modifyDaemonStatus_ dstatus $
\s -> s { scanComplete = True }
modifyDaemonStatus_ $ \s -> s { scanComplete = True }
return (True, r)
@ -218,8 +216,7 @@ onDelDir dir _ = do
onErr :: Handler
onErr msg _ = do
liftAnnex $ warning msg
dstatus <- getAssistant daemonStatusHandle
void $ liftIO $ addAlert dstatus $ warningAlert "watcher" msg
void $ addAlert $ warningAlert "watcher" msg
noChange
{- Adds a symlink to the index, without ever accessing the actual symlink