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:
parent
ea8df8fe9f
commit
47d94eb9a4
20 changed files with 141 additions and 152 deletions
|
@ -69,7 +69,6 @@ setRepoConfig uuid mremote oldc newc = do
|
|||
when (repoSyncable oldc /= repoSyncable newc) $
|
||||
changeSyncable mremote (repoSyncable newc)
|
||||
when (isJust mremote && repoName oldc /= repoName newc) $ do
|
||||
dstatus <- getAssistantY daemonStatusHandle
|
||||
runAnnex undefined $ do
|
||||
name <- fromRepo $ uniqueRemoteName (T.unpack $ repoName newc) 0
|
||||
inRepo $ Git.Command.run "remote"
|
||||
|
@ -78,7 +77,7 @@ setRepoConfig uuid mremote oldc newc = do
|
|||
, Param name
|
||||
]
|
||||
void $ Remote.remoteListRefresh
|
||||
updateSyncRemotes dstatus
|
||||
runAssistantY updateSyncRemotes
|
||||
|
||||
editRepositoryAForm :: RepoConfig -> AForm WebApp WebApp RepoConfig
|
||||
editRepositoryAForm def = RepoConfig
|
||||
|
|
|
@ -34,13 +34,14 @@ import qualified Data.Text as T
|
|||
{- Displays an alert suggesting to configure XMPP, with a button. -}
|
||||
xmppNeeded :: Handler ()
|
||||
xmppNeeded = whenM (isNothing <$> runAnnex Nothing getXMPPCreds) $ do
|
||||
dstatus <- getAssistantY daemonStatusHandle
|
||||
urlrender <- getUrlRender
|
||||
void $ liftIO $ addAlert dstatus $ xmppNeededAlert $ AlertButton
|
||||
{ buttonLabel = "Configure a Jabber account"
|
||||
, buttonUrl = urlrender XMPPR
|
||||
, buttonAction = Just $ removeAlert dstatus
|
||||
}
|
||||
void $ runAssistantY $ do
|
||||
close <- asIO removeAlert
|
||||
addAlert $ xmppNeededAlert $ AlertButton
|
||||
{ buttonLabel = "Configure a Jabber account"
|
||||
, buttonUrl = urlrender XMPPR
|
||||
, buttonAction = Just close
|
||||
}
|
||||
|
||||
getXMPPR :: Handler RepHtml
|
||||
#ifdef WITH_XMPP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue