Ticket #1484317 (closed Patches: fixed)
Sorting of messages fails when default mailbox is empty - patch
| Reported by: | Emil Wojak | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.1.1 |
| Component: | Interface | Version: | svn-trunk |
| Severity: | normal | Keywords: | |
| Cc: |
Description
The problem occurs if your main inbox is empty, but you have some mails in other folders. It's because RC enables sorting when it displays the folder list, not upon switching between folders nor after the number of messages in current folder changes (for example due to deletion). So when you have your LDA put all your mail in appropriate folders leaving your main inbox empty, then sorting will be disabled for you, and switching to filled folders won't update that state.
So my first patch attempt was to adjust the sorting capability on every folder switch and each time folder contents is updated by turning sorting on if there are more than 1 messages. But then I realised, that it should be possible to change sorting order even if the mailbox is empty, since it affects your preferences and lets you change your sorting order for future sessions. So all I changed was make RC unconditionally enable sorting.
The patch:
Index: program/js/app.js
===================================================================
--- program/js/app.js (wersja 536)
+++ program/js/app.js (kopia robocza)
@@ -129,7 +129,7 @@
this.message_list.addEventListener('dragend', function(o){ p.drag_active = false; });
this.message_list.init();
- this.enable_command('toggle_status', true);
+ this.enable_command('toggle_status', 'sort', true);
if (this.gui_objects.mailcontframe)
{
@@ -186,7 +186,7 @@
}
if (this.env.messagecount)
- this.enable_command('select-all', 'select-none', 'sort', 'expunge', true);
+ this.enable_command('select-all', 'select-none', 'expunge', true);
if (this.env.messagecount && (this.env.mailbox==this.env.trash_mailbox || this.env.mailbox==this.env.junk_mailbox))
this.enable_command('purge', true);
