k9mail/k-9 — pull request #357 by peschmae0 (2013-08-11 20:32:20+00:00)
Title: Hierarchical folder list

I have spent some time working on implementing a hierarchical folder list view as requested in issue #17 (https://code.google.com/p/k9mail/issues/detail?id=17).

It's likely that the current state of affairs breaks some things (haven't tested any out of pop3, webdav and imap servers other than dovecot with / as path separator) - so I'd be more interested in a review and suggestions for improvements rather than necessarily a merge at this point.

Brief summary of is modified:
- FolderList gets an additional FolderHierarchyFilter class that picks out a specific part of the folder tree, its filter() method is (hopefully) called at the appropriate locations in the code
- the folder_list_item gets an additional folder icon (stolen from accounts_item) for browsing into a folder
- there is a new FakeFolder class that is used to introduce missing pieces in the tree hierarchy to the FolderList (i.e. there may be a folder a/b on imap, where the parent folder a is not a mail-folder on the server and thus not in the list returned by the imap server)
- a major thing is how to get the correct hierarchy separator from the servers, I think I may have go that working by now (it is now cached in the account settings), haven't tested it for anything other than / though (there seem to be . and \ out in the wild)

- I replaced the ChooseFolder class by a class derived from FolderList, thereby reducing code duplication and imho improving user interface consistency (on the other hand the code in FolderList is much more complex than ChooseFolder had been previously...)