Bug 68410 - new email not displayed in preview pane when inbox is empty and email is barely received
Summary: new email not displayed in preview pane when inbox is empty and email is bare...
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.5.93
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-17 05:17 UTC by Michael Jones
Modified: 2007-09-14 12:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Jones 2003-11-17 05:17:19 UTC
Version:           1.5.93 (using KDE 3.1.93 (CVS >= 20031111), Gentoo)
Compiler:          gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r2, propolice)
OS:          Linux (i686) release 2.6.0-test9-gentoo

When there are currently no emails in my inbox and I try to download from a POP3 server (CTRL-L or "Check Mail" in button) and it succeeds in downloading a message to my inbox, the message is highlighted in the index pane (not sure what it's called, in the default configuration the pane right above the preview pane that lists all the emails contained in a specific folder) but is not displayed in the preview pane.  I can either double-click the message to display it in its own window or go to another email folder and then back to my inbox and it will be displayed.

To reproduce:
1. Start kmail, go to inbox.
2. Clear inbox of new messages.
3. Check email (retrieve messages from POP3 server)
Comment 1 Till Adam 2003-11-23 00:02:27 UTC
Subject: kdepim/kmail

CVS commit by tilladam: 

Make sure a lonely message arriving in a folder gets loaded into the reader
window.

CCMAIL: 68410-done@bugs.kde.org


  M +1 -0      kmheaders.cpp   1.591


--- kdepim/kmail/kmheaders.cpp  #1.590:1.591
@@ -1260,4 +1260,5 @@ void KMHeaders::msgAdded(int id)
     setCurrentItem( firstChild() );
     setSelectionAnchor( currentItem() );
+    highlightMessage( currentItem() );
   }
 


Comment 2 Paul Sprakes 2003-11-25 23:25:22 UTC
I think this patch is only halfway there. Now if a new message arrives in a folder which already has messages, and a message is already highlighted, you end up with 2 highlighted messages - which leads to confusion as to which message you are actually reading. Can you do something like the following pseudo-code:

if(folderEmptyBeforeMessageArrives) {
	highlightMessage( currentItem() );
}
Comment 3 Till Adam 2003-11-26 00:09:59 UTC
Hm, that's what it should be doing, in msgAdded:

if ((childCount() == 1) && hi) {
     setSelected( hi, true );
     setCurrentItem( firstChild() );
     setSelectionAnchor( currentItem() );
     highlightMessage( currentItem() );
}

Odd, I'll look into it.
Comment 4 Paul Sprakes 2003-11-26 00:57:48 UTC
>Hm, that's what it should be doing

Sorry, I should of looked at the code. I noticed it happen when I was reading the kmail mailing list folder and a new mail arrived which became automatically highlighted. I've been trying to reproduce it by sending myself a bunch of test emails but so far I have had no luck. I'll keep my eye open for it if it happens again and try to get you some more info.