Fix hooks for IDLE sync
`presynchook` and `postsynchook` for IDLE-triggered syncs were broken by
da69fd8
. This fixes them.
Signed-off-by: Reto Schnyder <reto.a.schnyder@bluewin.ch>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
21332efb08
commit
f6935342c2
|
@ -823,11 +823,12 @@ class IdleThread(object):
|
|||
statusrepos = account.statusrepos
|
||||
remotefolder = remoterepos.getfolder(self.folder, decode=False)
|
||||
|
||||
hook = account.getconf('presynchook', '')
|
||||
account.callhook(hook)
|
||||
hook_env = {
|
||||
'OIMAP_ACCOUNT_NAME': account.getname(),
|
||||
}
|
||||
account.callhook('presynchook', hook_env)
|
||||
offlineimap.accounts.syncfolder(account, remotefolder, quick=False)
|
||||
hook = account.getconf('postsynchook', '')
|
||||
account.callhook(hook)
|
||||
account.callhook('postsynchook', hook_env)
|
||||
|
||||
ui = getglobalui()
|
||||
ui.unregisterthread(currentThread()) #syncfolder registered the thread
|
||||
|
|
Loading…
Reference in New Issue