On Fri, Jun 28, 2013 at 4:37 PM, Andrew Sutherland < [email protected]> wrote:
> There is the begged question of whether the e-mail app should try and > avoid creating duplicate copies of blobs when the Blob is actually a File > from DeviceStorage and we are able to detect this. (Do Files express the > DeviceStorage storage areas they came from? Would we just try and reverse > map based on mime-type or hope sdcard and the storage name line up > exactly?) If we did this, there is the potential UX problem of the user > deleting the attachment after attaching it to a message, but either way, > the issues below still hold. > <snip> > Since the number of drafts is currently unbounded and we will soon support > background mail-sending for e-mail which will then also allow for unbounded > growth in data, DeviceStorage seems like the right place. Or at least the > least-bad place. > > Does this sound right? > 1. The email app should still work with full functionality even when the SD card is removed. 2. I think we should be very careful to make sure that the user understands what we're writing to the SD card, if users are going to be swapping SD cards, and especially if they will be swapping SD cards with other users. If I put my friend's SD card in my phone so I can listen to his music, I don't want the email app silently writing drafts of my emails onto his SD card. 3. At least in the long term, an app shouldn't have to choose between IndexedDB and DeviceStorage depending on *how much* data it plans to write to disk. It may make sense to have a "move this app's data to the SD card" option but I would hope that we could implement that in a way where IndexedDB (or localStorage or whatever) could still be used by the app without noticing any difference. 4. I think we should be working towards a goal of making DeviceStorage permission from the email app, by improving the capabilities of the alternatives that would make the use of DeviceStorage unnecessary. Using gmail.com in the browser should be as convenient, with respect to how an email app accesses the file system, as our built-in email app. So, I think it would be best if we avoided optimizing for the case where the email app has DeviceStorage, even if we have to continue using DeviceStorage until an alternative DeviceStorage-less implementation can be done. (Also, I am curious what exactly we'd need to improve in the platform to make it so the built-in email app doesn't need DeviceStorage.) Cheers, Brian _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
