| | |
| | | this.command('delete'); |
| | | else if (list.key_pressed == list.BACKSPACE_KEY) |
| | | this.command('delete'); |
| | | else if (list.key_pressed == 33) |
| | | this.command('previouspage'); |
| | | else if (list.key_pressed == 34) |
| | | this.command('nextpage'); |
| | | else |
| | | list.shiftkey = false; |
| | | }; |
| | |
| | | if (!this.env.threading) |
| | | return; |
| | | |
| | | var root = this.find_thread_root(uid); |
| | | var root = this.message_list.find_root(uid); |
| | | |
| | | if (uid == root) |
| | | return; |
| | |
| | | this.set_unread_children(root); |
| | | }; |
| | | |
| | | // finds root message for specified thread |
| | | this.find_thread_root = function(uid) |
| | | { |
| | | var r = this.message_list.rows[uid]; |
| | | |
| | | if (r.parent_uid) |
| | | return this.find_thread_root(r.parent_uid); |
| | | else |
| | | return uid; |
| | | } |
| | | |
| | | // update thread indicators for all messages in a thread below the specified message |
| | | // return number of removed/added root level messages |
| | | this.update_thread = function (uid) |
| | |
| | | count--; |
| | | else if (row.unread) { |
| | | // update unread_children for thread root |
| | | var parent = this.find_thread_root(uid); |
| | | var parent = this.message_list.find_root(uid); |
| | | rows[parent].unread_children--; |
| | | this.set_unread_children(parent); |
| | | } |