Bug 283887 - timeout on unread status doesn't work properly
Summary: timeout on unread status doesn't work properly
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: message list (show other bugs)
Version: 4.7
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-12 22:01 UTC by Fabio Rossi
Modified: 2012-02-08 21:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.8
Sentry Crash Report:


Attachments
debug.patch (1.69 KB, patch)
2011-12-24 15:42 UTC, Fabio Rossi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Rossi 2011-10-12 22:01:22 UTC
Version:           4.7 (using KDE 4.7.1) 
OS:                Linux

I have enabled the preference "Misc -> Mark selected message as read after" setting it to 3 seconds. What happens is that as soon as I select an unread message in the message list and quickly (less than 3 seconds) I select another message, the first one is marked as read even if less than 3 seconds have elapsed.

Reproducible: Always

Steps to Reproduce:
1) set Misc -> Mark selected message as read after to 3 seconds
2) select an unread message
3) quickly select another message before 3 seconds

Actual Results:  
the unread message is marked as read

Expected Results:  
the unread message should be marked as read only if the time indicated in the preferences elapses. This is a sort of regression for kmail2, kmail was working in this way
Comment 1 Laurent Montel 2011-10-13 10:40:49 UTC
Git commit 4d0d4f9f68ffc48e142c2decd632d9bdbcf38de4 by Montel Laurent.
Committed on 13/10/2011 at 12:18.
Pushed by mlaurent into branch 'master'.

Fix Bug 283887 - timeout on unread status doesn't work properly (restore feature as kmail1)

FIXED-IN: 4.7.3
BUG: 283887
BUG: 279019

M  +15   -14   messageviewer/markmessagereadhandler.cpp

http://commits.kde.org/kdepim/4d0d4f9f68ffc48e142c2decd632d9bdbcf38de4
Comment 2 Laurent Montel 2011-10-13 10:47:35 UTC
Git commit 12266b76f236f79aca01e2373089e486404a832c by Montel Laurent.
Committed on 13/10/2011 at 12:18.
Pushed by mlaurent into branch 'KDE/4.7'.

Fix Bug 283887 - timeout on unread status doesn't work properly (restore feature as kmail1)

FIXED-IN: 4.7.3
BUG: 283887
BUG: 279019

M  +17   -15   messageviewer/markmessagereadhandler.cpp

http://commits.kde.org/kdepim/12266b76f236f79aca01e2373089e486404a832c
Comment 3 Fabio Rossi 2011-10-13 21:49:52 UTC
I tried the patch but still doesn't work :-(

Basically what happens it that after I select an unread message and quickly select another message, the first message's status stays unread for the time specified in "Misc -> Mark selected message as read after", then it's marked as read in any case.

What I expect is different: the message should be marked as read only if the timeout indicated above elapses AND if the unread message is still selected.
Comment 4 Fabio Rossi 2011-11-04 23:39:03 UTC
Reopening the bug
Comment 5 Laurent Montel 2011-12-21 08:03:56 UTC
It works as described
Reclose it
Comment 6 Fabio Rossi 2011-12-21 23:12:33 UTC
Reopening, just tested with kmail 4.7.4. It *almost* works but there is a trivial problem. Let's assume there are two unread messages B and C while we're looking at read message A.

To reproduce the problem:

1) select message B
2) quickly reselect A before the timer specified in "Misc -> Mark selected message as read after" expires; in this way B is still unread (correctly)
3) now reselect B for a longer period than the timer, in this case the message is never marked read (wrong!)
4) now select C and wait for the timer to expire; C is marked as read
5) only now you can select B and it'll be marked as read after the timer expires

Let me know if something is not clear
Comment 7 Laurent Montel 2011-12-22 09:58:30 UTC
Ok now I understand you bug and fixed it.
Sorry I didn't see this problem.
Comment 8 Laurent Montel 2011-12-22 09:59:14 UTC
Git commit ecb724ef9f093f235f83d5f42f82a4ffe2358798 by Montel Laurent.
Committed on 22/12/2011 at 10:57.
Pushed by mlaurent into branch 'master'.

Fix bug bug 283887 timeout on unread status doesn't work properly

BUG: 283887
FIXED-IN: 4.8

M  +1    -2    messageviewer/markmessagereadhandler.cpp

http://commits.kde.org/kdepim/ecb724ef9f093f235f83d5f42f82a4ffe2358798
Comment 9 Laurent Montel 2011-12-22 09:59:54 UTC
Git commit bde2985c5e10235c83593fe4b7646d9bb3a30ddc by Montel Laurent.
Committed on 22/12/2011 at 10:57.
Pushed by mlaurent into branch 'KDE/4.8'.

Fix bug bug 283887 timeout on unread status doesn't work properly

BUG: 283887
FIXED-IN: 4.8
(cherry picked from commit ecb724ef9f093f235f83d5f42f82a4ffe2358798)

M  +1    -2    messageviewer/markmessagereadhandler.cpp

http://commits.kde.org/kdepim/bde2985c5e10235c83593fe4b7646d9bb3a30ddc
Comment 10 Laurent Montel 2011-12-22 10:00:26 UTC
Git commit 7f27bade0213acc6f78c16d930b33a699c62766f by Montel Laurent.
Committed on 22/12/2011 at 10:57.
Pushed by mlaurent into branch 'KDE/4.7'.

Fix bug bug 283887 timeout on unread status doesn't work properly

BUG: 283887
FIXED-IN: 4.8
(cherry picked from commit ecb724ef9f093f235f83d5f42f82a4ffe2358798)

M  +1    -2    messageviewer/markmessagereadhandler.cpp

http://commits.kde.org/kdepim/7f27bade0213acc6f78c16d930b33a699c62766f
Comment 11 Fabio Rossi 2011-12-24 15:41:47 UTC
I tried your patch for the branch 'KDE/4.7' against kmail 4.7.4 but the problem is still there :-(

Moreover I prepared the attached debug patch to investigate more about the problem but I don't see any output (I should have correctly configured the kmail2 debug area with kdebugdialog)
Comment 12 Fabio Rossi 2011-12-24 15:42:26 UTC
Created attachment 67086 [details]
debug.patch
Comment 13 Laurent Montel 2012-02-08 16:46:11 UTC
I retested today and it works fine.
So I close it, until you give me the exact problem.
I re-read code all is ok. So I don't understand why it doesn't work for you but code work here.
Comment 14 Fabio Rossi 2012-02-08 21:10:37 UTC
Now I'm using kmail 4.8.0. I confirm it works, thanks!