add globallyAvailable to remotes
This commit is contained in:
parent
57e5960758
commit
449520a573
12 changed files with 23 additions and 4 deletions
|
@ -53,15 +53,18 @@ calcSyncRemotes = do
|
|||
let good r = Remote.uuid r `elem` alive
|
||||
let syncable = filter good rs
|
||||
let nonxmpp = filter (not . isXMPPRemote) syncable
|
||||
|
||||
liftIO $ print (nonxmpp, map Remote.globallyAvailable nonxmpp)
|
||||
|
||||
return $ \dstatus -> dstatus
|
||||
{ syncRemotes = syncable
|
||||
, syncGitRemotes =
|
||||
filter (not . Remote.specialRemote) syncable
|
||||
, syncDataRemotes = nonxmpp
|
||||
, syncingToCloudRemote =
|
||||
any (Git.repoIsUrl . Remote.repo) nonxmpp
|
||||
, syncingToCloudRemote = any iscloud nonxmpp
|
||||
}
|
||||
where
|
||||
iscloud r = not (Remote.readonly r) && Remote.globallyAvailable r
|
||||
|
||||
{- Updates the sycRemotes list from the list of all remotes in Annex state. -}
|
||||
updateSyncRemotes :: Assistant ()
|
||||
|
@ -69,6 +72,7 @@ updateSyncRemotes = do
|
|||
modifyDaemonStatus_ =<< liftAnnex calcSyncRemotes
|
||||
status <- getDaemonStatus
|
||||
liftIO $ sendNotification $ syncRemotesNotifier status
|
||||
|
||||
when (syncingToCloudRemote status) $
|
||||
updateAlertMap $
|
||||
M.filter $ \alert ->
|
||||
|
|
|
@ -293,7 +293,10 @@ checkCloudRepos :: UrlRenderer -> Remote -> Assistant ()
|
|||
-- TODO only display if needed
|
||||
checkCloudRepos urlrenderer r =
|
||||
#ifdef WITH_WEBAPP
|
||||
cloudRepoNeeded urlrenderer (Remote.uuid r)
|
||||
unlessM (syncingToCloudRemote <$> getDaemonStatus) $
|
||||
cloudRepoNeeded urlrenderer (Remote.uuid r)
|
||||
#else
|
||||
noop
|
||||
#endif
|
||||
|
||||
writeChunk :: Handle -> B.ByteString -> IO ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue