k9mail/k-9 — pull request #439 by mjholgate (2014-01-05 21:35:37+00:00)
Title: Per-identity sent folders

Hi,

[Note: not quite ready for merge yet, but I would be interested in feedback]

This is a patch I've been working on to allow a different Sent folder to be used for each account identity. Is this any use to the project?

By default, messages are saved to the account's default Sent folder, but this can be overridden for each individual identity by picking a folder in the Identity settings.

A couple of things I wasn't sure about:

1) It might be nicer to use the dialog based folder picker as used in the existing Folder settings screen, rather than the ChooseFolder full screen activity. However, this would involve factoring out the dialog code, so I chose this solution for the initial version as it was much easier as the ChooseFolder activity was already easily reusable.

2) I've annotated a few parts of the code with "MJH" where I wasn't sure if I was doing the right thing or not.

3) I wasn't sure if I needed special code to make sure that the folder actually exists before writing a message to it.

Please let me know if this is useful, and if so if you are happy with the general approach. I'm happy to tweak it as necessary for this to be included upstream.

Thanks!