add alert when committing

This commit is contained in:
Joey Hess 2012-08-02 14:02:35 -04:00
parent e21a32627f
commit 74fc9fcbe6
2 changed files with 6 additions and 1 deletions

View file

@ -189,6 +189,9 @@ activityAlert header message = baseActivityAlert
startupScanAlert :: Alert
startupScanAlert = activityAlert Nothing "Performing startup scan"
commitAlert :: Alert
commitAlert = activityAlert Nothing "Committing changes to git"
pushAlert :: [Remote] -> Alert
pushAlert rs = activityAlert Nothing $
"Syncing with " ++ unwords (map Remote.name rs)

View file

@ -54,7 +54,9 @@ commitThread st changechan commitchan transferqueue dstatus = runEvery (Seconds
, show (length readychanges)
, "changes"
]
void $ tryIO $ runThreadState st commitStaged
void $ alertWhile dstatus commitAlert $
tryIO (runThreadState st commitStaged)
>> return True
recordCommit commitchan (Commit time)
else refill readychanges
else refill changes