Developers (#1) - small patch (#77) - Message List

small patch

Hi, when I choose an address from the address book and it only has a first name, I get something like "john null". Here's a small patch that seems to take care of it, for me at least:

--- LogicMail-1.1/LogicMail/src/org/logicprobe/LogicMail/ui/	2009-05-22 10:48:34.000000000 +0200
+++ new1.1/LogicMail/src/org/logicprobe/LogicMail/ui/	2009-05-22 10:44:08.000000000 +0200
@@ -400,7 +400,15 @@
                 for(int i=0;i<fieldIds.length;i++) {
                     if(fieldIds[i] == Contact.NAME) {
                         String[] values = c.getStringArray(Contact.NAME, 0);
-               = values[1] + " " + values[0];
+			if (values[0] != null) {
+				if (values[1] != null) {
+ = values[1] + " " + values[0];
+				} else {
+ = values[0];
+				}
+			} else {
+ = values[1];
+			}
                     if(fieldIds[i] == Contact.EMAIL) {
                         for(int j=0;j<c.countValues(Contact.EMAIL);j++) {
  • Message #205

    Thanks! I've created ticket #136 track merging of this patch.

    • Message #206

      Thanks for integrating it. I noticed a small issue in that my patch seems to use/assume tabs as 4 spaces, and the rest of the file is just spaces. Also, I tried compiling and signing trunk which has the same issue. Though I can't send mail with that yet (get a null pointer exception).

      I'm a bit confused about the discussion process. There are 2 message lists and 2 mailing lists performing a similar function. Wouldn't it be better to just have one? Also, how about an IRC channel?

      One other comment. I think you wrote somewhere that you're planning on 2.0 having push mail. What api provides that? Ideally I'd like to get my own personal mail independent of my work BES mail, but delivered the same way (push, LED notification, etc.).

      • Message #208

        Yeah the whole tabs-vs-spaces problem is a little annoying, especially since the default in Eclipse is a state of partial carefree confusion. I usually wind up just configuring Eclipse to explicitly use only spaces. Regardless, I fixed the indentation of your patch before committing the merge anyways. In the process of testing it, I also discovered a painting issue with the field. Its an issue that I'm surprised I never noticed before, or that no one ever mentioned to me. (basically if it isn't the top field in the screen, it paints blank if a name is selected from the address book)

        For trunk, I thought I fixed the NullPointerException issue. Unless you have an old checkout, I'd be curious as to what line of code is throwing the exception.

        For discussion, I put the forums on the website first. I recently decided to add the mailing lists, because I was having far too many private e-mail discussions. The hope is that I can force users to start sending their messages to the mailing lists instead of e-mailing me personally. That way I don't have to answer the same vague questions 500 times, often with equally vague responses. For the developer discussions, I'd just like to move my various e-mail conversations somewhere that others can see and chime in. I know it all seems a bit redundant, but having forums never stopped anyone from sending private e-mail or writing invalid tickets ;-)

        My main issue with having an IRC channel is that there will be 1-2 people idle in it 99% of the time, and every 5 hours you will get this:

          [9:25] <jdoe> Hello, I just installed LogicMail on my BlackBerry 8XXX,
                        and I'm having a problem where I blah, and it blah bloops
                        de blah.  Anyone else run into this?
          [9:26] <jdoe> Anyone?
          [9:27] * jdoe has quit ("Leaving")

        2.0 won't have "push mail" in the traditional sense. Without infrastructure support, that is pretty much impossible. What it will have is polling and IMAP IDLE capability. That means it keeps an open connection (or periodically opens a new connection in the background), and updates itself with new messages.