mozilla-b2g/gaia-email-libs-and-more — pull request #33 by mozsquib (2012-09-11 01:29:17+00:00)
Title: De-refactor some FolderSyncer logic

@asutherland: this PR moves some stuff from `FolderSyncer` back into `FolderStorage` since it should behave the same for ActiveSync and IMAP.

Now, `FolderStorage.sliceOpenFromNow` is pretty much like it was originally, except it calls `FolderSyncer.syncDateRange` and `FolderSyncer.syncAdjustedDateRange` to handle protocol-specific parts.

I think I should also try to put some of the bits from `FolderSyncer.onSyncCompleted` into `FolderStorage`, since it references `this.folderStorage` an awful lot...