Merge pull request #86 from dopefishh/communicate-syncmode-to-synchooks

Communicate syncmode to synchooks
This commit is contained in:
Rodolfo García Peñas (kix)
2022-03-25 11:43:10 +01:00
committed by GitHub
3 changed files with 23 additions and 17 deletions

View File

@ -838,10 +838,10 @@ class IdleThread:
remotefolder = remoterepos.getfolder(self.folder, decode=False)
hook = account.getconf('presynchook', '')
account.callhook(hook)
account.callhook(hook, "idle")
offlineimap.accounts.syncfolder(account, remotefolder, quick=False)
hook = account.getconf('postsynchook', '')
account.callhook(hook)
account.callhook(hook, "idle")
ui = getglobalui()
ui.unregisterthread(currentThread()) # syncfolder registered the thread