Home > Hacking, Igalia, Maemo, Modest > Modest with BODYSTRUCTURE support

Modest with BODYSTRUCTURE support

December 16th, 2009 Leave a comment Go to comments

These last weeks Dape and me have been working really hard fixing bugs in Modest and Tinymail here and there. Best Modest ever is coming.

But today, I don’t want to talk about fixes but features. I want to talk about BODYSTRUCTURE. This is one of the coolest features we could have added to Modest. Tinymail had some initial support, but due to the many bugs it had and the fact that some use cases were not supported forced us not to use it so far. But thanks to the time Igalia gives us for hacking we managed to get it working.

Oh wait! I didn’t tell you what BODYSTRUCTURE is about. Email messages are made of a group of MIME parts. One of them could be the subject, another one some footer and some others could be attachments. Without BODYSTRUCTURE support we were forced to download all those MIME parts when you wanted to see a message. This meant that if the message had some heavy attachments and you only wanted to see a small body with just a couple of words, you had to wait until the full message was downloaded,

With this new feature, we can download every MIME part one by one, and thus saving you time, disk space and specially if you’re using a mobile device like N900, money in your GPRS connections. Do you want to read only the body? No problem we’ll show you that you have some attachments but we won’t download them until you request us to do so. Do you want to forward the full message? No problem, we properly detect that and include the full original message whether or not it was completely downloaded before.

This will most likely be included in the next N900 software update that will be eventually delivered by Nokia. In the meantime, if you don’t want to wait just download packages and build it by yourself. Remember that you can find us in #modest channel @ Freenode.

Categories: Hacking, Igalia, Maemo, Modest Tags:
  1. December 17th, 2009 at 13:03 | #1

    Great work, awesome

  2. December 17th, 2009 at 14:31 | #2

    Hei Sergio, are we going to have search in email reader?

  3. Sergio
    December 17th, 2009 at 14:50 | #3

    Well, we have a preliminary work that would add “Live Search” (like in Contacts application in N900) to the window with the list of headers. As soon as you type it starts to filter the list of headers. We’ll try to get that in if we have time.

  4. Toan
    December 18th, 2009 at 02:57 | #4

    Great work!
    I wished you in the same time implemeted locally caching the already loaded bodyparts, this will:
    * Speed the loading of email
    * Keep the cost at minimum as people can update on WiFi and then read the body later.

    We got alot fo diskspace, there should be enough room for this…

  5. anonymous
    December 18th, 2009 at 03:43 | #5

    In newer versions will IMAP work like it’s intended? I notice currently it doesn’t sync with the IMAP server, it only downloads the mail locally.

  6. DaSilva
    December 18th, 2009 at 04:00 | #6

    Yeah, the IMAP “sync” feature / bugfix would be really nice.

  7. DaSilva
    December 18th, 2009 at 04:12 | #7

    And maybe you can look into this: http://talk.maemo.org/showpost.php?p=432234&postcount=462

    Is there no possibility to release updates for Modest in the repository? Then nobody has to wait for a firmware update from Nokia.

  8. Sergio
    December 18th, 2009 at 09:31 | #8

    Caching the already downloaded messages/mime parts was always there. So once you read a message then you could see it again and again while offline

  9. Sergio
    December 18th, 2009 at 09:32 | #9

    If by “sync” you mean remove in device -> remove in server, for example, yes it was fixed a couple of weeks ago.

  10. Toygar34
    December 18th, 2009 at 10:58 | #10

    That’s great news. I am a newbee so sorry for the question but how can we download this patches to our N900?

  11. Sergio
    December 18th, 2009 at 11:10 | #11

    If you’re a newbee then you’d have to wait for next Nokia software update.

    But if you know how to build packages you need to download
    * modest-3-2 branch of modest from git.maemo.org
    * modest-3-2 branch of tinymail from svn.tinymail.org

    Build packages and install them.

  12. Toan
    December 18th, 2009 at 15:08 | #12

    Oki, I guess the slowness made it look like it always pulled email from server then.

  13. December 18th, 2009 at 15:38 | #13

    Sergio :
    Well, we have a preliminary work that would add “Live Search” (like in Contacts application in N900) to the window with the list of headers. As soon as you type it starts to filter the list of headers. We’ll try to get that in if we have time.

    Thanks, this is the feature I am waiting for.

  14. Sergio
    December 18th, 2009 at 15:43 | #14

    Not really. The problem was that we need to sort and filter the list of emails. As sorting and filtering is performed by gtk, if there are a lot of headers, then gtk+ does not have enough time to filter, sort and display headers fast enought. Actually the time Modest spend downloading from server is very reduced, but sorting and filtering something like 5000 messages is too much for gtk+ in the device.

  15. Toan
    December 18th, 2009 at 18:46 | #15

    Well, what I found out after testing it a little bit more, it seems like Modest tries to connect to server to fetch new email, the it (probably) must sort and filter, and last show the email. In that order.

    When not having connection to server, the display of emails if much faster, we talk about delay approx 1-2 sec.

    Maybe you should consider first should already downloaded/cached emails, then do the update in the background, sort and last append it to existing view. This will make Modest _feel_ more responsive.

  16. Sergio
    December 18th, 2009 at 18:51 | #16

    Definitely reading first emails from cache will make modest more responsive. The problem is in tinymail’s architecture. Basically tinymail has an object called TnyDevice that represents the status of the connection. If that TnyDevice is online the the function that retrieves the emails will always check the server first. Forcing that TnyDevice to be offline will only provoke strange behaviours and continuous reconnections. But we’ll investigate that. Thx for the suggestion!

  17. Toan
    December 18th, 2009 at 19:19 | #17

    If I get the Maemo SDK platform up and running, I will be gladly to help out 🙂

  1. March 5th, 2010 at 17:13 | #1
  2. March 6th, 2010 at 20:26 | #2
  3. March 9th, 2010 at 04:42 | #3