[imp] Various meaningful IMP default settings
Hiromi Kimura
hiromi at tac.tsukuba.ac.jp
Wed Dec 17 04:43:06 UTC 2014
Quote lst_hoe02 at kwsoft.de:
> Zitat von Daniel Vollbrecht <d.vollbrecht at scram.de>:
>
>> 2. Message order: Folders are always opened in the right order that
>> I configured (newest on top), but the oldest message at the bottom
>> is selected and thus the scroll bar is at its bottommost position.
>> It should be at the topmost position as I always have to scroll up
>> for miles to see the newest messages.
>
> There is a setting in IMP if the newest unread message is displayed
> first or the oldest unread. This should do the trick, no?
Please try this patch.
--- imp/lib/Mailbox/List.php.orig 2014-12-04 08:34:49.000000000 +0900
+++ imp/lib/Mailbox/List.php 2014-12-17 13:24:10.000000000 +0900
@@ -517,13 +517,19 @@
try {
$res =
$this->_mailbox->imp_imap->status($this->_mailbox,
Horde_Imap_Client::STATUS_FIRSTUNSEEN |
Horde_Imap_Client::STATUS_MESSAGES);
if (!is_null($res['firstunseen'])) {
+ if($res['firstunseen'] == 0){ /* no unseen */
+ return $sortpref->sortdir
+ ? 1
+ : $total;
+ }
return $sortpref->sortdir
? ($res['messages'] - $res['firstunseen'] + 1)
: $res['firstunseen'];
}
} catch (IMP_Imap_Exception $e) {}
- return 1;
+ return $sortpref->sortdir
+ ? 1 : $total;
}
$unseen_msgs =
$this->unseenMessages(Horde_Imap_Client::SEARCH_RESULTS_MIN, array(
-=-=-=-=-
Hiromi KIMURA http://www.tac.tsukuba.ac.jp/~hiromi/
More information about the imp
mailing list