summaryrefslogtreecommitdiff
path: root/Assistant/DaemonStatus.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-03-15 19:16:13 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-03-15 19:16:13 -0400
commiteabe9d8c6177318432eb81120f4d5db05898c891 (patch)
tree6fedada070d79a4afec236a63ead893bc41b04e9 /Assistant/DaemonStatus.hs
parent34c604b935e6e3e40796c9132ed19d44442cb809 (diff)
add globallyAvailable to remotes
Diffstat (limited to 'Assistant/DaemonStatus.hs')
-rw-r--r--Assistant/DaemonStatus.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/Assistant/DaemonStatus.hs b/Assistant/DaemonStatus.hs
index 5df2267f7..6c71c60eb 100644
--- a/Assistant/DaemonStatus.hs
+++ b/Assistant/DaemonStatus.hs
@@ -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 ->