IMAP sync code improvements (PR #11640)

  • move all idle logic into the syncer so it is in one place
  • remove extra params passed to process to reduce complexity
  • reduce process complexity by splitting it up into smaller methods
  • improve disconnect error raising and handling

GitHub

hmmm … what is the story with this one @martin-brennan , is it still relevant?

@SamSaffron Sadly don’t think I will get to this kind of thing for a while. The idea behind it is to make the code for IMAP syncing more readable and a lot more explicit about what actions it is taking on mail and topics/posts and why. Will revisit it at some point, closing for now.