Bug 335086 - by default mail list in inbox should be sorted descendingly by time
Summary: by default mail list in inbox should be sorted descendingly by time
Status: RESOLVED FIXED
Alias: None
Product: trojita
Classification: Unclassified
Component: Desktop GUI (show other bugs)
Version: 0.4.1
Platform: openSUSE RPMs Linux
: NOR wishlist (vote)
Target Milestone: ---
Assignee: Trojita default assignee
URL: https://git.reviewboard.kde.org/r/118...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-20 14:17 UTC by Bruce Ouyang
Modified: 2014-06-13 18:42 UTC (History)
1 user (show)

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 Bruce Ouyang 2014-05-20 14:17:29 UTC
when i open trojita,  mail list in inbox is sorted ascendingly by time. the very top mail in mail list is the oldest one, if i try to check my newest mails ,i have to scroll down or sort it desendingly.
i'd like it's sorted descendingly by default.


Reproducible: Always
Comment 1 Jan Kundrát 2014-05-20 14:40:15 UTC
There's an option for that in the menu: View -> Sorting -> Descending. The default sort order of "top to bottom" is not going to change.

By default, Trojita scrolls to the first recent e-mail in a mailbox. What IMAP server do you use (i.e. is it GMail which does not provide \Recent, or something else)? How many messages do you have in that mailbox which you complain about, and how many of them are marked as read and how many are unread? What's the distribution of them, i.e. are the oldest messages still unread, etc.?
Comment 2 Bruce Ouyang 2014-05-20 16:55:59 UTC
i just checked that option, when i opened trojita, this option is descending , and trojita did not scroll to the first recent email in my inbox.
im using gmail. i dont know if gmail provide \Recent
i have 368 messages in my inbox. maybe about 100 messages(not a precise number) are unread, 
the oldest 20 ( at least ) messages are readed
and i found just now, when clicking on the scroll bar and then drapping up or down, it get stuck from time to time.
Comment 3 Bruce Ouyang 2014-05-20 16:59:51 UTC
ps: just when i opened trojita ,i checked the sort order and descending is selected, but the oldest one is on top. after several manual sort(clicking on the date column header), i found the sort order was correct then.
Comment 4 Thomas Lübking 2014-05-20 18:29:18 UTC
I spot two issues here:
---------------------------------
1. scrolling to last recent/unseen does only work on first open of a mailbox
2. the ascending/descending order is not stored to disk UNLESS you manipulate the layout otherwise (move a splitter a bit)

2. seems trivial to fix, 1. i don't know (w/o looking up the code ;-)
Comment 5 Thomas Lübking 2014-05-20 20:58:22 UTC
Patch:
https://git.reviewboard.kde.org/r/118229/
Comment 6 Thomas Lübking 2014-05-28 12:38:06 UTC
Git commit cab81c4fabbae6e3faf20d1a45d5ef5c23acba38 by Thomas Lübking.
Committed on 28/05/2014 at 12:12.
Pushed by jkt into branch 'master'.

Sortorder woes

- triggers the save timer on swapping direction
- preserves scroll offset on swapping direction
- scrolls to unseen/recent (ie. actually top/bottom) when entering a mailbox

REVIEW: 118229

M  +13   -0    src/Gui/Window.cpp
M  +1    -0    src/Gui/Window.h

http://commits.kde.org/trojita/cab81c4fabbae6e3faf20d1a45d5ef5c23acba38
Comment 7 Jan Kundrát 2014-06-13 17:47:14 UTC
Seems that I forgot to close this bug.

Bruce, the trojita-nightly package contains a fix for the problem you reported.
Comment 8 Pali Rohár 2014-06-13 18:09:29 UTC
I do not know, but maybe this my commit from pali-gsoc branch is still relevant: http://quickgit.kde.org/?p=clones/trojita/pali/trojita.git&a=commit&h=cc929a561d0c1a9b3551328e6e9b69640930e37f
Comment 9 Thomas Lübking 2014-06-13 18:42:08 UTC
should be covered, see cab81c4fabbae6e3faf20d1a45d5ef5c23acba38